Missing-digit numbers

Missing-digit numbers

Strike out every whole number that uses the digit 7. Almost all of them go, yet the survivors are a Cantor set in disguise and still hold infinitely many primes.

Before this: Prime numbers, The Cantor set.

Write the whole numbers in base ten and cross out every one with a 7 anywhere in it: 7, 17, 27, every number from 70 to 79, 107, 170 and so on. The numbers left are the missing-digit numbers for the digit 7, sometimes called ellipsephic. Any base q and any set of forbidden digits gives a family of its own. Write F for the set of allowed digits and m for how many there are, so forbidding one digit in base ten leaves m = 9.

Counting them is easy because the digits are chosen independently. A string of k digits has 9 choices in each place, so of the 10^k numbers below 10^k exactly 9^k avoid the 7, counting 0. The share left is (9/10)^k: 90 percent below ten, 65.61 percent below ten thousand, under 0.003 percent below 10^100. So the missing-digit numbers have density zero, because a long random number almost surely contains every digit. Below x there are roughly x^(log 9 / log 10), about x^0.954, of them: a thin set, but not a very thin one.

The figure lays out every number below ten thousand as one cell of a 100 by 100 board, the first two digits choosing the row and the last two the column. The 3439 numbers with a 7 are punched through. A 7 in the thousands or tens place clears a band ten cells wide, and a 7 in the hundreds or units place clears a line one cell wide. The 6561 survivors, 9^4, stand in 81 blocks of 81, and the 680 primes among them are lit.

The sum of 1/n over all the whole numbers grows without bound, slowly, like the logarithm. Strike out the numbers with a 9 and the sum converges (Kempner 1914). The proof is the count above: there are 8 x 9^(k-1) numbers of k digits with no 9, each at least 10^(k-1), so together they add less than 8 x (9/10)^(k-1), and those bounds add up to 80. The true value is about 22.92 (Wikipedia). The same happens whenever at least one digit is forbidden, in any base.

Divide the missing-digit numbers below q^k by q^k. They land between 0 and 1 at the points whose first k digits after the point are all allowed, and as k grows they settle onto a Cantor set: the numbers between 0 and 1 whose base-q expansion uses allowed digits only. In base 3 with the digit 1 forbidden that is exactly the middle-thirds Cantor set. The count and the set share one exponent: the set has dimension log m / log q, and the allowed integers below x number about x to that power. Seen from far away, the base-ten numbers without a 7 are a Cantor set of dimension 0.954.

Density zero does not make the set lawless. Erdos, Mauduit and Sarkozy 1998 studied how missing-digit numbers fall into residue classes and showed that, apart from the obstructions the digits themselves create, they split evenly among the classes of moduli that are not too large; Konyagin 2001 widened the range. The obstructions are real: allow only even digits and every number is even, allow only 0, 3, 6 and 9 and every number is a multiple of 3.

The primes are the hard question, because a prime is defined by multiplication and a missing digit by the way numbers are written. Maynard 2019 proved that for every digit there are infinitely many primes that never use it in base ten, and about as many as a random model predicts: below x their number lies between two constant multiples of x^(log 9 / log 10) / log x. The same paper handles large bases with many digits forbidden at once, up to about q^(23/80) of them. Maynard 2022 gives an asymptotic count, with an explicit constant, of the primes missing any one digit in every base above two million.

The tool behind both is the Fourier transform of the set, and missing digits make it unusually kind. Write e(t) = e^(2 pi i t) and let hat F(t) = sum_(d in F) e(d t) be the digit transform of the allowed digits. Because a number is a string of independent digits, the transform of all the missing-digit numbers below q^k is a product with one factor per digit place: sum_(n < q^k, n allowed) e(n t) = prod_(l < k) hat F(q^l t). Nothing like that holds for the primes, and it is the reason missing-digit sets can be handled at all.

What the method needs from that product is how spread out it is. Sample it at the q^k fractions a / q^k, divide by m^k so that every value is at most 1, and add up the sizes: that is the l^1 norm of the digit transform. With every digit allowed it is exactly 1, all the weight sitting at a = 0, and the crude bound is q^k. Maynard's key estimate is that with one digit missing in base ten it is at most a constant times 10^(27 k / 77), a small power of the number of fractions, so the transform is large at only a few frequencies and the primes need to be understood only there. The smaller that exponent, the stronger the handle, which makes it the number to compute for a new base or a new digit set.

In the tree

The coprimality spine reads a missing-digit set as a one-dimensional digit design and, in its section on primes, names the two numbers Maynard's sieve takes from the set, the l^1 exponent and a fractional moment. The Mobius meter measures how far the Mobius function cancels on missing-digit sets, with an l^1 threshold of 1/4 on its pair route. The first base below a quarter looks for the least base at which one missing digit brings the l^1 exponent under that bar. The zeta function of a digit design replaces Kempner's 1/n with n^(-s) and follows the series to every s. The Cantor set these numbers trace is the Cantor set, and the primes they keep are the primes.