My inbox contained the following content from Puzzle A Day:
The number 105263157894736842 is fascinating. This is because it’s the smallest positive integer with a remarkable property that occurs when you move its final digit to the front: 210526315789473684. How is the new number related to the original?
It doesn't take long to see the new number is twice the original. I got Gemini to investigate further via this query:
The number 105263157894736842 is the smallest positive integer with a remarkable property that it doubles when you move its final digit to the front: 210526315789473684. This is quite a large number. Why are there no smaller numbers with this property? What is the next largest number? Is there any history behind the discovery of such numbers? There must be somebody who first discovered it.
Here was Gemini's response:
Numbers that multiply by an integer \(k\) when their trailing digit is shifted to the front are known in recreational number theory as \(k\)-parasitic numbers—and the smallest solutions for each multiplier are specifically called Dyson numbers. The 18-digit integer \(105{,}263{,}157{,}894{,}736{,}842\) is the smallest 2-parasitic number in base 10.
1. Why There Are No Smaller Solutions
To see why 18 digits is the absolute minimum, we can translate the digit-shifting operation into a modular congruence.
Suppose an \(m\)-digit number \(X\) ends with the units digit \(d\) (where \(1 \le d \le 9\)), and the remaining \(m-1\) leading digits form the number \(A\). We can express \(X\) as:\[X = 10A + d\]Moving the final digit \(d\) to the front of the \(m-1\) digits of \(A\) produces the shifted number:\[Y = d \cdot 10^{m-1} + A\]We require this shifted number to be exactly twice the original number (\(Y = 2X\)):\[ \begin{aligned} d \cdot 10^{m-1} + A &= 2(10A + d) \\ \\ d \cdot 10^{m-1} + A &= 20A + 2d \\ \\ 19A &= d \, (10^{m-1} - 2) \end{aligned} \]Now solve for the original number \(X = 10A + d\) by multiplying both sides by \(19\):\[ \begin{aligned} 19X &= 19(10A + d) = 10(19A) + 19d \\ \\ 19X &= 10d \, (10^{m-1} - 2) + 19d = d \,(10^m - 20 + 19) \\ \\ X &= \frac{d \, (10^m - 1)}{19} \end{aligned} \]For \(X\) to be a positive integer, the numerator \(d \, (10^m - 1)\) must be divisible by \(19\):
- Since \(d\) is a single digit (\(1 \le d \le 9\)) and \(19\) is prime, \(\gcd(d, 19) = 1\).
- Therefore, \(19\) must divide \(10^m - 1\), which is equivalent to the congruence:\[10^m \equiv 1 \pmod{19}\]The smallest positive integer \(m\) that satisfies \(10^m \equiv 1 \pmod{19}\) is the multiplicative order of \(10\) modulo \(19\). By Fermat's Little Theorem, \(m\) must be a divisor of \(\phi(19) = 18\) (so \(m \in \{1, 2, 3, 6, 9, 18\}\)). Checking the smaller divisors modulo \(19\):
- \(10^1 \equiv 10 \pmod{19}\)
- \(10^2 \equiv 5 \pmod{19}\)
- \(10^3 \equiv 12 \pmod{19}\)
- \(10^6 \equiv (12)^2 \equiv 11 \pmod{19}\)
- \(10^9 \equiv 12 \cdot 11 \equiv 18 \equiv -1 \pmod{19}\)
Because \(10\) is a primitive root modulo \(19\) (and \(19\) is a full reptend prime in base 10), the decimal expansion of \(\frac{1}{19}\) has the maximum possible period length of \(19 - 1 = 18\). No power of \(10\) smaller than \(10^{18}\) leaves a remainder of \(1\) when divided by \(19\), making an 18-digit number the shortest possible length.
Furthermore, we cannot pick \(d = 1\). If \(d = 1\), then$$X = \frac{10^{18} - 1}{19} = 052{,}631{,}578{,}947{,}368{,}421$$which has a leading zero and is actually a 17-digit number whose shift fails unless padded with a leading zero. Thus, \(d = 2\) yields the true smallest positive solution.
2. What Are the Next Largest Numbers?
Every valid choice of units digit \(d \in \{2, 3, 4, 5, 6, 7, 8, 9\}\) in the formula:$$ X = \frac{d \,(10^{18} - 1)}{19}$$ generates an 18-digit solution. Because \(\frac{1}{19}\) is a cyclic number, all eight 18-digit solutions are simply integer multiples of \(\frac{10^{18}-1}{19}\) and are cyclic permutations of the exact same 18 digits:
| Rank | Units Digit d | Fraction | 2-Parasitic Number X | Doubled / Shifted Result 2X |
|---|---|---|---|---|
| 1 | \(d = 2\) | \(2/19\) | \(105{,}263{,}157{,}894{,}736{,}842\) | \(210{,}526{,}315{,}789{,}473{,}684\) |
| 2 | \(d = 3\) | \(3/19\) | \(157{,}894{,}736{,}842{,}105{,}263\) | \(315{,}789{,}473{,}684{,}210{,}526\) |
| 3 | \(d = 4\) | \(4/19\) | \(210{,}526{,}315{,}789{,}473{,}684\) | \(421{,}052{,}631{,}578{,}947{,}368\) |
| 4 | \(d = 5\) | \(5/19\) | \(263{,}157{,}894{,}736{,}842{,}105\) | \(526{,}315{,}789{,}473{,}684{,}210\) |
| 5 | \(d = 6\) | \(6/19\) | \(315{,}789{,}473{,}684{,}210{,}526\) | \(631{,}578{,}947{,}368{,}421{,}052\) |
| 6 | \(d = 7\) | \(7/19\) | \(368{,}421{,}052{,}631{,}578{,}947\) | \(736{,}842{,}105{,}263{,}157{,}894\) |
| 7 | \(d = 8\) | \(8/19\) | \(421{,}052{,}631{,}578{,}947{,}368\) | \(842{,}105{,}263{,}157{,}894{,}736\) |
| 8 | \(d = 9\) | \(9/19\) | \(473{,}684{,}210{,}526{,}315{,}789\) | \(947{,}368{,}421{,}052{,}631{,}578\) |
- The immediate next largest number is the \(d = 3\) case: \(157{,}894{,}736{,}842{,}105{,}263\).
- Notice that the 3rd solution (\(d = 4\)) is \(210{,}526{,}315{,}789{,}473{,}684\)—which is the doubled result of the first solution!
- Beyond 18 digits: Because \(10^m \equiv 1 \pmod{19}\) holds whenever \(m\) is a multiple of \(18\) (\(m = 18, 36, 54, \dots\)), the next family of solutions occurs at 36 digits. You obtain them simply by concatenating any 18-digit solution with itself. The smallest 36-digit solution is:\[105263157894736842105263157894736842\]
3. History and Discovery
While the underlying cyclic period of \(\frac{1}{19}\) was known to 18th- and 19th-century number theorists studying repeating decimals and primitive roots (including Johann Heinrich Lambert in 1769, Carl Friedrich Gauss in Disquisitiones Arithmeticae in 1801, and William Shanks in the 1850s), the specific digit-shifting puzzle has a rich recreational pedigree:
- Walter B. Gibson (1938) & Maurice Kraitchik (1942): The earliest documented versions of the digit-transposition puzzle in recreational literature trace to American magician and puzzle writer Walter B. Gibson in 1938, and Belgian mathematician Maurice Kraitchik, who analyzed cyclic digit-shifting multiplications in his 1942 classic Mathematical Recreations.
- Freeman Dyson's Table Puzzle: In the mid-20th century, physicist Freeman Dyson famously posed the problem at a mathematical gathering: "Find the smallest positive integer that doubles when its last digit is moved to the front". Because Dyson could calculate the 18-digit number mentally in a few seconds—by starting with a trailing \(2\) and repeatedly doubling right-to-left with carries (\(2 \to 42 \to 842 \to 6842 \dots\) until reaching \(1\) with no carry)—the smallest \(n\)-parasitic numbers (OEIS sequence A092697) became known as Dyson numbers.
- Leon Bernstein (1968): In his paper "Multiplicative twins and primitive roots" (Mathematische Zeitschrift, 1968), mathematician Leon Bernstein formalized the algebraic theory connecting these numbers directly to primitive roots and \(p\)-adic expansions.
- Clifford A. Pickover (2000): The term "parasitic number" was coined and popularized by science and mathematics author Clifford Pickover in Chapter 28 of his 2000 book Wonders of Numbers.
Key takeaway: The size of the smallest \(k\)-parasitic number depends entirely on the multiplicative order of \(10\) modulo \((10k - 1)\). For \(k = 2\), \(10k - 1 = 19\) is a full reptend prime, forcing an 18-digit minimum. By contrast, for \(k = 4\), \(10k - 1 = 39 = 3 \times 13\), and since \(10^6 \equiv 1 \pmod{39}\), the smallest 4-parasitic number has just 6 digits: \(102{,}564 \times 4 = 410{,}256\).