the greatest concentration ends up closer to the Fermi level. Since the Fermi level must remain constant in a system in thermodynamic equilibrium, stacking layers of materials with different properties leads to many useful electrical properties induced by band bending, if the interfaces can be made cleanly enough. For example, the p-n junction's properties are due to the band bending that happens as a result of the necessity to line up the bands in contacting regions of p-type and n-type material. This effect is shown in a band diagram. The band diagram typically indicates the variation in the valence band and conduction band edges versus some spatial dimension, often denoted x. The Fermi level is also usually indicated in the diagram. Sometimes the intrinsic Fermi level, Ei, which is the Fermi level in the absence of doping, is shown. These diagrams are useful in explaining the operation of many kinds of semiconductor devices. Relationship to carrier concentration (low doping) For low levels of doping, the relevant energy states are populated sparsely by electrons (conduction band) or holes (valence band). It is possible to write simple expressions for the electron and hole carrier concentrations, by ignoring Pauli exclusion (via Maxwell–Boltzmann statistics): where is the Fermi level, is the minimum energy of the conduction band, and is the maximum energy of the valence band. These are related to the value of the intrinsic concentration via an expression which is independent of the doping level, since (the band gap) does not change with doping. The concentration factors and are given by where and are the density of states effective masses of electrons and holes, respectively, quantities that are roughly constant over temperature. Techniques of doping and synthesis Doping during crystal growth Some dopants are added as the (usually silicon) boule is grown by Czochralski method, giving each wafer an almost uniform initial doping. Alternately, synthesis of semiconductor devices may involve the use of vapor-phase epitaxy. In vapor-phase epitaxy, a gas containing the dopant precursor can be introduced into the reactor. For example, in the case of n-type gas doping of gallium arsenide, hydrogen sulfide is added, and sulfur is incorporated into the structure. This process is characterized by a constant concentration of sulfur on the surface. In the case of semiconductors in general, only a very thin layer of the wafer needs to be doped in order to obtain the desired electronic properties.