I can’t resist sharing something I just learned about this week. *p*-adic numbers! I discovered them while exploring angle sequences in creating Koch-like curves, and was immediately fascinated by them. For example, we’ll see that in the field of 5-adic numbers,

That’s right — the integer with *infinitely* many 4’s strung together is actually equal to ! This seems impossible at first glance, but is actually closely related to

using decimal numbers.

The subject of *p*-adic numbers is a broad area in number theory, and we’ll only get a chance to take a small glimpse into it. The simplest examples to look at are related to *geometric series.* We’ll briefly review them to refresh your memory.

Recall that

when either or

When for example, the series

diverges. To see this, we need to take the sequence of partial sums

which keeps getting larger and larger. By contrast, the series

converges because the sequence of partial sums

keeps getting closer and closer to 2. Of course we can verify the sum with the formula

The key idea behind discussing convergence is creating a precise mathematical definition of “getting closer and closer to.” This is done using limits (we will not need to go into details here) and the distance function on the real numbers:

Intuitively, the absolute value of the difference between two numbers is an indication of how close they are.

For a sequence like

which are the partial sums of the geometric series

it seems that the terms keep getting further and further apart:

In the field of *p*-adic numbers, closeness is measured a different way. This might sound strange at first, but let’s consider closeness in plane geometry for a moment.

We are all familiar with the usual distance function in Euclidean geometry:

But maybe you weren’t aware that there are *other* ways to define distance in the plane — in fact, *infinitely* many ways — which give rise to non-Euclidean geometries. One of the simplest is

This is often called the *taxicab distance,* since it describes how far it is from one point to another if you took a taxi on a rectangular grid of streets.

For example, consider going from (0,0) to (3,2) — we’ll use blocks as units — if you could *only* walk north, south, east, or west. The shortest path might be to go east three blocks, and then north two blocks. Or perhaps north one block, east three blocks, and then north one block again. But the shortest path will *always* require that you walk five blocks, since you aren’t allowed to walk along a diagonal path. (Note that the shortest path is *not* always unique in taxicab geometry!)

This is a perfectly legitimate geometry, with its own set of properties. For example, the “unit circle” described by the equation

is in fact not a circle at all, but a square with vertices at a distance of 1 along the axes!

But not any function for distance will work — for example, you’ve got to make sure the triangle inequality is still valid (and it is in taxicab geometry). So while some properties still need to hold, most other properties *won’t.*

What does this have to do with *p*-adic numbers? We’re going to look at the positive integers for now, but define close in a very different way. So we can look at some specific examples, let’s take

Here’s the big leap: we say a positive integer is 5-small if there are *many* factors of 5 in its prime factorization. More specifically, if *q* is the largest power of 5 which is a factor of *n,* then the we say that its 5-“size” is

Here are a few more examples, which you should be able to work out for yourself.

But not *everything* big is small! For example,

since there are no factors of 5 present (which is true for any number ending in a 1).

This may seem odd at first, but when you read more about it, it’s actually *amazing.* I’ll have to admit that to understand a lot of the amazingness, you’d have to go to grad school in mathematics…. But we’ll get to look at a litte bit of it here.

Before we do, though, there’s another role that 5 plays. We’ve got to write 5-adic numbers *in base* 5. There’s not room to go into all the details here, but we’ll give a brief review.

Recall that in base 10, we have

We can only use the digits 0–9.

Now in base 5, we can only use the digits 0–4, and we interpret the digits as follows:

We add the same way as we do in base 10, except we carry when we add to more than 5 (and not 10). Thus,

Subtraction, multiplication, and division are handled similarly.

You won’t need to be an expert in base-5 arithmetic in order to understand how this applies to the equation

But that will have to wait for the next post on *p*-adic numbers! We’ll see why this is true, and maybe even talk a little bit about rational *p*-adic numbers, too….