# The prime numbers do not satisfies Benford's law

A set of numbers is said to satisfy Benford's law if the leading digit d (d ∈ {1, ..., 9}) occurs with probability,

$$P(d)=\log_{10}(d+1)-\log_{10}d,$$

how do you prove that the prime numbers do not satisfies Benford's law?

-
What probability distribution are you using on the prime numbers? – Chris Eagle Dec 29 '12 at 17:06
P(d) is just the frequence of the digit d in the prime numbers, is the limit of the number of primes with leading digit d( looking the first n primes) / n – user52188 Dec 29 '12 at 17:22
Technically, not a probability - there is no uniform probability on any countable set. This term here is "density." – Thomas Andrews Dec 29 '12 at 17:26
you have every reason. Now I think that the question is clear. – user52188 Dec 29 '12 at 19:33

Essentially you face the same problem as the question of whether the natural numbers satisfy Benford's law: if you look at the pattern up to some maximum value $m$ then the distribution depends on what $m$ is, and there is no convergence as $m$ increases because the first digit of $m$ is not stable, though there is a degree of uniformity in the distribution.

From the prime number theorem, the number of primes between $d \times 10^k$ and $(d+1) \times 10^k$ is about $\dfrac{10^k}{\ln((d+\frac12) \times 10^k)}$ while the number between $(d+1) \times 10^k$ and $(d+2) \times 10^k$ is about $\dfrac{10^k}{\ln((d+\frac32) \times 10^k)}$.

The ratio of these tends towards $1$ as $k$ increases, so if you look at the distribution of first digits of primes below $10^k$ then this tends towards uniform as $k$ increases. Nothing like Benford's law.

But if you look at at the distribution of first digits of primes below $3 \times 10^k$, then for large $k$ there will be almost ten times as high a proportion starting with $1$ (or $2$) than with $3$ (or each of the higher digits).

-

FWIW Prime Numbers do follow a generalized Benford Law (cf. Bartolo Luque, Lucas Lacasa, http://arxiv.org/PS_cache/arxiv/pdf/0811/0811.3302v1.pdf)

What it boils down to is that the distribution of primes is estimated as x/ln(x), and Benford's law describes a logarithmic distribution.

-
The title of that paper states (correctly) that the first digit frequencies of primes tend to uniformity. So generalized is being used in a very particular sense. – Henry Sep 6 '15 at 9:23

"[H]ow do you prove that the prime numbers do not satisfies (sic) Benford's law?"

The question of Benford's Law for prime numbers has some wrinkles to it. Back in 1972, R. E. Whitney proved that prime numbers exhibited the Benford's Law distribution in the logarithmic density, which generalizes the "natural density" (they agree on all sets for which the natural density exists). That was published in the American Mathematical Monthly, vol 79, pages 150-152 ("Initial digits for the sequence of primes"). Shortly after that, Bombieri showed that the prime numbers had the Benford's Law distribution in the Riemann Zeta density, which also generalizes the natural density; I don't think that proof was ever published, but J.-P. Serre mentions the result on page 76 of "A Course in Arithmetic" (https://www.math.purdue.edu/~lipman/MA598/Serre-Course%20in%20Arithmetic.pdf). In 1984, Cohen et al showed in "Prime Numbers and the First Digit Phenomenon," Journal of Number Theory, vol 18, pages 261 - 268, that any density that generalizes the natural density with certain intuitive properties (e.g., when you multiply by two you halve the density) and which could measure the density of first digits of primes would follow Benford's Law (http://ac.els-cdn.com/0022314X84900611/1-s2.0-0022314X84900611-main.pdf?_tid=509b9d70-826f-11e5-8d70-00000aacb361&acdnat=1446585211_c0f3dcdb9846df09399024856bdf16f3).

So it's not clear to me how you would prove that prime numbers DON'T satisfy Benford's Law. It is true that prime numbers are not strongly Benford, but then, neither are the positive integers.

-