“I need more arbitrary math in my life for the sake of being a nerd.”
Alright, maybe you’ve never thought that, but I recently watched a Numberphile video about a quite interesting sequence of numbers. The sequence begins
2, 3, 4, 82000, …
which follows a well-defined mathematical rule. It piqued my interest partially because I enjoy the Numberphile YouTube channel, but mainly because the number 82000 seems to come out of nowhere. No one knows what the next number of the sequence is, or if there even is one.
How is the sequence defined?
The On-line Encyclopedia of Integer Sequences defines the sequence such that the n-th integer is the smallest number > 1 whose representation in all bases up to n consists only of zeros and ones.
In everyday life we write numbers in base-10, where each digit can be 0–9. The Babylonians used base-60, the Mayans base-20. Let’s use base-8 as an example. The digits 372 in base-8 denote:
$$3 \cdot 8^2 + 7 \cdot 8^1 + 2 \cdot 8^0 = 250$$
Generally, a number in base $b$ with digits $d_1 \cdots d_n$ denotes:
$$d_1 b^{n-1} + d_2 b^{n-2} + \cdots + d_n b^0$$
The sequence starts with base-2. In binary, the smallest number whose representation uses only 0s and 1s is 2 itself — it’s $(10)_2$, so the first term is 2. (Base-2 is a trivial case: all numbers in base-2 are already made of 0s and 1s.)
The next term is the smallest number satisfying bases 2 and 3 simultaneously, which is 3. Then 4.
| Decimal | base-2 | base-3 | base-4 |
|---|---|---|---|
| 2 | 10 | ||
| 3 | 11 | 10 | |
| 4 | 100 | 11 | 10 |
Here’s where it gets interesting. You might expect the next term to be 5, but:
| Decimal | base-2 | base-3 | base-4 | base-5 |
|---|---|---|---|---|
| 5 | 101 | 12 | 11 | 10 |
In base-3, the representation of 5 contains a 2 — against the rule. It turns out the smallest number satisfying bases 2 through 5 is 82,000:
| 82000 in different bases | |
|---|---|
| base-2 | 10100000001010000 |
| base-3 | 11011111001 |
| base-4 | 110001100 |
| base-5 | 10111000 |
All zeros and ones in every base. But 82000 in base-6 is 1431344 — not all zeros and ones — so we need to keep searching for the next term.
At the moment nobody knows what the next number is, or if one even exists. I’ve written a program to brute-force the search — details in the next post.