Rational and irrational infinite integers

Epistemic status: a fine line between genius and madness

*

Let’s start with the observation that it is much easier to use digits before the decimal point than the digits after it. A six years old child could calculate e.g. 11 + 2, but calculating reliably 0.11 + 0.2 will take a few more years of education.

From this perspective, it is quite ironic that we typically use numbers that only have a few digits before the decimal point, and many, sometimes infinitely many digits after the decimal point, such as 13 = 0.333333333… = .

Obviously, it would be better the other way round.

*

Technically, we already have infinitely many digits in front of every number. But they are all zeroes; and by convention, we do not write them. Writing a zero or multiple zeroes in front of a number does not change its value; the number 007 mathematically means 7. Therefore, technically, we could write the number 7 with infinitely many digits in front of it, like this: .

But it seems like a waste of space to only ever fill those infinitely many pre-decimal places with zeroes. What about using some other digit instead?

Consider the number , which consists of infinitely many nines. Written in full, it would be like this: = …999999999.

The value of this number is −1.

How can we know that? Simply, just calculate …999999999 + 1 = …000000000, which is zero. (Zero with an arbitrary number of zeroes in front of it is zero: 0 = 00 = 000 = .)

Similarly, …999999998 = is −2, because . Also , , and so on.

Seems like we have invented a new syntax for negative numbers. Instead of writing a minus symbol in front of a number, just let the digits underflow. If an odometer in your car showed only nines, you would know what happens if you go the extra mile.

*

What if we fill the infinite pre-decimal places with digits other than zeroes and nines? For example, how much is ?

I believe this number is −1/​9.

We can easily verify it by multiplying the number by 9 and adding 1..

Okay, this seems strange. How did a fraction smaller than one suddenly become an infinite integer? But as you can clearly see, it did. Remember, our goal was to move the infinite digits behind the decimal point to the front of it. And so far, we are succeeding!

*

We can similarly get other negative fractions by dividing by the denominator, and multiplying the result by the numerator. For example, , , . Check it, .

To obtain a positive fraction, we can subtract the negative fraction from zero. For example, . Check it, . Seems correct.

But there is still problem with fractions like 12 or 15. There is no integer, not even infinite one, such that if we multiplied it by 2 or by 5, the last digit of the result would be 1. (We can easily check it, because the last digit of the result only depends on the last digit of the original number.) Therefore, some decimal places seem inevitable: 12 remains 0.5, and 15 remains 0.2. We have not eliminated all decimal places from the fractions, only the infinite sequences thereof.

Using the new syntax, any fraction will have at most finite number of decimal places. To see why it is so, extract the powers of 2 and 5 from the denominator, like this: , then calculate the infinite integer and divide it by and . The number of decimal places of the result will be max(i, j). That kinda sucks, but whatever.

By the way, , and . I assume it is obvious why.

(Having an infinite number of digits both before and after the decimal point would lead to ambiguity. For example, 13 could be expressed as both and .)

*

Okay, so now we can convert an arbitrary fraction to a periodic number with finite decimal part. Can we also do it the other way round? For example, what fraction is expressed by a number ? (Notice that “123” is the periodic part, “45″ is not.)

*

But what about the non-periodic infinite integers? (By the way, now we have uncountably many integers, how cool is that?) Do they correspond to the irrational numbers?

Let’s try to calculate . The result cannot have decimal places, because infinite decimal places are forbidden, and if you have a number with finite decimal places, its square only has more decimal places. So we need to find an infinite integer such that its square is 2.

However, there is no such integer, not even an infinite one. The last digit of a square only depends on the last digit of the original number, but if the original number ends with 0, its square ends with 0; if it ends with 1 or 9, its square ends with 1; if it ends with 2 or 8, its square ends with 4; if it ends with 3 or 7, its square ends with 9; if it ends with 4 or 6, its square ends with 6; and if it ends with 5, its square ends with 5. Therefore, in our new system, there is no such thing as . (Or , or many others.)

The problem is even easier to see with . Would it be an infinite integer, or a decimal number? A square of an integer is an integer. A square of a decimal number with finite decimal places has twice as many decimal places. Neither of those can equal to 0.5.

(However, there seem to be more values of than one might expect. In addition to the obvious and , there also seem to be non-periodic values such as …4218751; but maybe I just made a mistake somewhere. EDIT: Actually, see the note at the end.)

*

Apparently in this new system, we have lost the traditional irrational numbers (some of them? all of them? I have no idea), and gained some new irrational integers (non-periodic infinite integers) which correspond to… uhm, something else, I guess. Spooky.

I admit I am out of my depth here. I tried to follow this rabbit hole as far as I could, and this is exactly how far I got. I hope you enjoyed the ride.

*

According to Wikipedia, you should not do this stuff in base 10, but should use a prime base, such as binary. (The proper term for these infinite integers is p-adic numbers.) It is not obvious to me much how much this would actually help. I was able to map rational numbers to periodic numbers in base 10, too. And the calculation of would also fail in binary, for the same reason. What is then the supposed advantage?

(Hat tip to 3Blue1Brown for What does it feel like to invent math?)

*

EDIT: I was curious about the mysterious new values of , and although my math skills are not sufficient to do this properly, at least I wrote a program to check all combinations of last 100 digits in bases from 2 to 100, to find ones ending with …0001 when squared.

The new values of seem to appear only when the base is not a prime number (nor a power of a prime), which would kinda explain the recommendation in Wikipedia.

More specifically, the number of values of seems to depend on how many different primes divide the base, and it goes (including the traditional values of 1 and ) like this: 2, 4, 8, 16, 32..., which seems suspiciously like the powers of 2.

(My intuition tells me that if you choose a subset of the primes dividing the base, you can somehow obtain from that a value of in a way that maps “none” to 1, and “all” to −1, and the remaining combinations to the irrational integers. No more specific ideas.)

The new values of follow some rules that are obvious in hindsight. They come in pairs: if x is a solution, then so is -x, because . If you multiply x by -x, you get −1, because . Multiplying two solutions that are not the opposite of each other results in yet another solution, because if and , then also .

The two new solutions in base 10 are like …480163574218751 and …519836425781249, which does not remind me of anything. If you want more than two new solutions, you need to try at least base 30 (=2×3×5) for six new solutions, or base 210 for fourteen.