Hofstadter's butterfly (source code)

= Hofstadter's butterfly
{wiki=Hofstadter's_butterfly}

Hofstadter's butterfly is a fractal pattern that appears in the study of electron behavior in a two-dimensional lattice subjected to a magnetic field. It is named after Douglas Hofstadter, who introduced it in his 1976 paper, "Energy Levels and Wave Functions of a Two-Dimensional Electron Gas in a Magnetic Field." The phenomenon arises when examining the energy levels of electrons in a periodic potential (like a crystal lattice) under the influence of a magnetic field.