THE IDEA OF COUNTING TRUNCATABLE PRIMES Thanks, Sarah

THE IDEA OF COUNTING TRUNCATABLE PRIMES
TIMOTHY J. MCLARNAN
Abstract. A quick answer to some of Sarah’s questions on truncatable primes.
Thanks, Sarah, for raising the questions about whether what I was saying about
truncatable primes made sense. See, you’re thinking carefully about math!
What did I mean by taking about computations, you asked, since the only computations seemed to be peeling off digits? It didn’t look like there were any computations involved.
You’re right, of course, but theres a little more to the story than I said in
the earlier note. Let’s see if I can explain this without being (a) too long and
(b) incomprehensible.
Forget truncatable primes for a minute, and let’s just think about all primes.
Suppose I wanted to know how many primes total there are less than 100, or less
than a million, or less than a hundred trillion. Thats not a trivial question, because
the primes are spread out rather randomly. For primes less than a hundred, I could
just count them. There are 26 of them if you include 1. For primes less than a
million, I could get a computer to count. There are 78,499. For primes less than
100 trillion, there are too many for a computer to count. So now what do I do?
Well, I could try to get an approximation to the exact count. Figure 1 shows
a plot of how many primes there are that are less than n as a function of n. For
instance, there are 5 primes less than 10, and if you go up from 10 on the horizontal
axis, you land at 5 on the vertical axis. You could notice that the way the graph
works is that it jumps up 1 at every prime, and it stays constant in between primes.
Now, this graph looks very irregular, which is what you’d expect. The primes are
pretty random, right? But suppose you zoom out farther. Figure 2 and Figure 3
zoom out to show the number of primes less than every number less than 100
(Figure 2) and every number less than 10,000 (Figure 3). The farther out you go,
the smoother the curve gets!
Now, it turns out there is a function called the logarithmic integral, which doesn’t
have a button on your calculator, but which isn’t too hard to compute. This logarithmic integral function ends up being very close to the prime counting function.
The farther out you zoom, the closer together the graphs of the prime counting
function and the logarithmic integral get.
Figure 4 illustrates this by showing the logarithmic integral along with the prime
counting function for n ≤ 1000; and Figure 4 shows the logarithmic integral along
with the prime counting function for n ≤ 10, 000
The trouble, from a mathematician’s point of view, is that we feel a need to prove
that no matter how far out you go, even way out past where we can compute the
prime counting function, there always is this connection between the prime counting
Date: September 2, 2013.
1
2
TIMOTHY J. MCLARNAN
Figure 1. The prime counting function for n ≤ 20.
Figure 2. The prime counting function for n ≤ 100.
function and the logarithmic integral. This is a hard theorem called (stupidly) the
Prime Number Theorem. It wasn’t known to be true until about 1900, and proving
it uses some heavy machinery with names like Mellin transforms and the Riemann
zeta function. The proof is too hard for me to show to my college students.
If you believe that the prime counting function and the logarithmic integral are
always close together, though, then you can use the logarithmic integral (easy to
THE IDEA OF COUNTING TRUNCATABLE PRIMES
3
Figure 3. The prime counting function for n ≤ 10, 000.
Figure 4. The prime counting function (blue) and the logarithmic
integral (red).
compute) as an approximation for the prime counting function (hard to compute).
For instance, the logarithmic integral of 100 trillion is about 3,204,942,065,909.1;
the number of primes less than 100 trillion has to be close to this number: about
3.2 trillion.
Still with me?
4
TIMOTHY J. MCLARNAN
Figure 5. The prime counting function (blue) and the logarithmic
integral (red).
What I’d like to do is to find some function like the logarithmic integral that
counts truncatable primes. It will be an approximation, not an exact count, but it
will be much simpler to compute than the exact count, which can only be done by
listing them all.
Here’s where the computation comes in. Finding this approximating function
and proving that it works is impossibly hard for me or for anybody. But making
a reasonable guess based on what we know about the prime counting function and
the logarithmic integral isn’t too bad. It involves machinery with names like recurrences and Taylor-Maclaurin series and exponential functions: stuff you haven’t
met, but that my college students do know about. It’s still a little messy, though—
calculations that take a few pages. Those are the calculations I said I was still
working on the details of.
In the end, though, what I have is some formulas for approximating the truncatable prime counting function that seem to work just as well as the logarithmic
integral function does for the ordinary prime counting function.
That’s the sort of thing mathematicians do, and that’s how I spent my summer
vacation.
Incidentally, this is all new stuff. The Prime Number Theorem is only a little
over a hundred years old; the stuff about truncatable primes is new math as of this
summer. So if the pictures and the ideas make sense, or even sort of make sense,
then feel very good about yourself. You’re not bad at math. And you’re not a bad
buy, either. Have I mentioned that before?
E-mail address: [email protected]
Author’s address: Dept. of Mathematics, Earlham College, Richmond, IN 47374