Electrons in a uniform magnetic field