2-adic integer (source code)

= 2-adic integer
{title2=$\mathbb Z_2$}

A 2-adic integer is an element of the <p-adic integers> for $p=2$, equivalently a compatible <sequence> of residues modulo $2^r$. Its binary <p-adic digits> begin with its <parity>. The highlighted residue-tree path for $13$ begins $1,0,1,1$, while <modular inversion converges to a p-adic inverse> computes the infinite expansion of $1/3$.