A7 · The graveyardNo leak
Benford and the digits of p
Primes’ follow their own pattern, not Benford’s law. N’s first digit tells you p’s only through the known size of p.
The idea
says the first digit d appears with probability log₁₀(1 + 1/d). Primes don’t follow it exactly: their first digits depend on how far you count, and the pattern is already explained by how thinly primes are spread. And for a key N = p·q, the first digit of N tells you about the first digit of p only through the known size of p, which is not a clue about which prime it is.
Watch it
Shares of each leading digit: measured on all primes in range, the prime-density prediction, and Benford’s law.
The test
Distance from Benford and from the prime-density prediction for four ranges, then information between the two first digits for 20,000 keys of fixed and of mixed sizes against what shuffling gives by luck.
Fig. A7.2How far the leading digits of primes sit from Benford’s law and from the prime-density prediction, by range
Measuring…