Code/Magic Sequences
< Return to code directoryThis is a toy I made for visualizing the "magic sequences" used for generating expansions of fractions. The magic sequence is defined as:
Where is the base, is the denominator of the fraction, and is the starting offset. The number of times the value "rolls over" in the modulus determines the digit at that place. The line colors are a color scale from red to blue based on the number of rollovers.