p-adic distance

in normal math, two numbers are close when they're nearby. in p-adic math, two numbers are close when their difference is very divisible by p. 1 and 3 are far apart in the reals. in 2-adics they're 2 apart... no wait, closer than 1 and 2.

the distance is |a-b|ₚ = p^(-v), where v is how many times p divides (a-b). so |2-0|₂ = 1/2, |4-0|₂ = 1/4, |8-0|₂ = 1/8. multiples of 2 get closer to zero the more powers of 2 they have.

the wild part: ...111111 in binary is -1. it's an infinite string of 1s, and adding 1 to it carries all the way forever, giving 0. so ...111 + 1 = 0, meaning ...111 = -1. p-adic numbers let you write infinite expansions to the left.

pick p below. left panel: 2-adic distance from 0 for the first 32 integers. right panel: the tree — numbers sharing more low bits sit under the same branch.

2