This block is an animation of forming the 2-adic numbers in a fractal-like process. Starting with zero and one, we alternate two steps. First, we visually scale down the existing plot, which doesn’t actually change anything. Then, we subdivide each number. The left half stays the same, and to the right half we add an increasing power of two, one more than the previously largest number in the list.
The 2-adic distance metric, which is shift invariant, considers numbers to be closer if they were formed by a more recent subdivision, which is shown visually as similar colors. Analytically, two numbers are close if their difference is divisible by a high power of two. So while 16 is close to 0, 32 is closer, and 64 is closer still.
The integers expand to the right of the number line (or the left of the numeral). But the 2-adics expand into themselves: each subdivision grows in the same space that was once zero to one. These numbers dart back and forth in a contained space; you can hold infinity in the palm of your hand.
Inspired by this video.