In detonation engines and accidental explosions, a detonation may propagate in an inhomogeneous mixture with non-uniform reactant concentration. In this study, one- and two-dimensional simulations are conducted for detonation propagation in hydrogen/oxygen/nitrogen mixtures with periodic sinusoidal or square wave distribution of the reactant concentration. The objective is to assess the properties of detonation propagation in such inhomogeneous mixtures. Specifically, detonation quenching and reinitiation, cellular structure, cell size and detonation speed deficit are investigated. It is found that there exists a critical amplitude of the periodic mixture composition distribution, above which the detonation quenches. When the amplitude is below the critical value, detonation quenching and reinitiation occur alternately. A double cellular structure consisting of substructures and a large-scale structure is found for a two-dimensional detonation propagating in inhomogeneous mixtures with a periodic reactant concentration gradient. The detonation reinitiation process and the formation of the double cellular structure are interpreted. To quantify the properties of detonation propagation in different inhomogeneous mixtures, the large cell size, critical amplitude, transition distance and detonation speed deficit are compared for hydrogen/air without and with nitrogen dilution and for periodic sine wave and square wave distributions of the reactant concentration. The large-scale cell size is found to be linearly proportional to the wavelength, and both the critical amplitude and the transition distance decrease with the wavelength. The small detonation speed deficit is shown to be due to the incomplete combustion of the reactant. This work provides helpful understanding of the features of detonation propagation in inhomogeneous mixtures.