What Are p-adic Numbers?

p-adic expansions, the famous ...1111 = -1 result, and fractal tree visualization of Z_p

What Are p-adic Numbers?

Pick a prime p and write numbers with digits that run forever to the left. In this world -1 is an infinite string of digits, and a sum that blows up in the reals adds up to -1.

p-adic Expansion Explorer

Enter an integer, pick a prime, and watch its base-p digits appear from right to left. Then try a negative number and notice that the digits never stop.

p-adic Expansion Explorer

Enter an integer and choose a prime to see its p-adic digit expansion, written from right (least significant) to left (extending toward infinity).

5-adic expansion of 42
Go deeper:What Are p-adic Numbers?

In the familiar real number system, we expand numbers in base 10 with digits extending to the right of the decimal point: 3.14159... The p-adic numbers turn this idea on its head. For a prime p, a p-adic integer is a sequence of digits in base p that extends infinitely to the left. Instead of approximating a number by adding smaller and smaller decimal fractions, we approximate by specifying its remainder modulo larger and larger powers of p.

This seemingly strange construction leads to a complete number system with its own notion of distance, convergence, and algebra. In the p-adic world, numbers that are divisible by high powers of p are considered "small," and the divergent-looking series (p-1) + (p-1)p + (p-1)p² + ... actually converges -- to -1. The p-adic numbers are indispensable in modern number theory, from solving Diophantine equations to the proof of Fermat's Last Theorem.

Go deeper:p-adic Expansion Explorer

Every integer has a unique representation as a finite sequence of digits in base p. Enter a number and watch its p-adic digits unfold from right to left. Try negative numbers to see the infinite repeating pattern that represents them.

Key insight: Unlike decimal expansions that grow to the right, p-adic expansions grow to the left. A positive integer has finitely many nonzero p-adic digits, but a negative integer like -1 requires infinitely many -- this is not a bug but a feature of the p-adic number system.

The Infinite Sum That Equals -1

Step through the partial sums of (p-1) + (p-1)p + (p-1)p² + ... and check that at every level each one agrees with -1 modulo pk.

...1111 Equals Minus One

The series (p-1) + (p-1)p + (p-1)p² + ... -- the number whose base-p digits are all p-1 -- converges to -1 in the p-adic numbers. Step through to see how partial sums approach -1 modulo increasing powers of p.

2-adic representation of -1...1111
kPartial sum SkSk valueSk mod 2k+1-1 mod 2k+1Match?
01111=
Step 0: S0 = 1 = 21 - 1. Adding 1 gives 21 = 2, so modulo 21 the partial sum equals 1, which is exactly -1 mod 2 = 1.
Step 1 / 8
Go deeper:The Infinite Sum That Equals -1

Perhaps the most surprising fact about p-adic numbers: the infinite sum (p-1) + (p-1)p + (p-1)p² + ... -- the number whose base-p digits are all p-1 -- converges to -1. Step through the partial sums and verify that at every level of precision (modulo pk), the partial sum agrees perfectly with -1.

Key insight: This is not a trick or a formal manipulation. In the p-adic metric, the partial sums genuinely get closer and closer to -1. The partial sum through the pn term equals pn+1 - 1 ≡ -1 mod pn+1for every n, which is exactly what p-adic convergence means.

p-adic Number Tree

Click through the tree to build a p-adic integer one digit at a time. Each node branches p ways, one for each possible digit.

p-adic Number Tree

Click nodes to build a 2-adic integer one digit at a time. Each level represents a digit position: the bottom level is the units digit, the next is the 2s digit, and so on.

20212223000011011001101100011011001101

Click a node in the tree to start building a 2-adic number. Begin with the bottom level (units digit) and work upward.

Go deeper:p-adic Number Tree

The p-adic integers form a fractal-like structure that can be visualized as a tree. At each level, a node branches into p children, one for each possible digit. A p-adic integer corresponds to an infinite path through this tree, choosing one digit at each level.

Key insight: The tree structure reveals the topology of the p-adic integers. Two numbers are "close" in the p-adic metric if and only if their paths through the tree agree for many levels. This branching structure makes the p-adic integers a Cantor set -- totally disconnected yet compact and uncountable.

Key Takeaways

  • Digits extend left -- the mirror image of decimal expansions
  • Small means divisible -- high powers of p are p-adically tiny
  • Divergent series converge -- (p-1) + (p-1)p + (p-1)p² + ... equals -1
  • Fractal structure -- the p-adic integers form an infinite branching tree

Spot a mistake or have an idea?

Search