Is the clustering of prime powers merely coincidental?

Solution 1:

For primes $p$ and $q$ the ratio $r=\log(p)/\log(q)$ is an irrational number and by the Equidistribution theorem the sequence $\{r,2r,3r,4r,\ldots\}$ is asymptotically equidistributed modulo 1.

Specifically, for large $N$ we would expect that $2\epsilon N$ elements of $\{i\cdot r\}_{i=1}^N$ are equivalent mod 1 to a number in the intervals $[0,\epsilon]\cap[1-\epsilon,1)$. This implies that $p^i$ is within a factor of $q^\epsilon$ of a power of $q$.

So if we look at powers of $p$ up to $N$ and want one to be within about 1 part in 200 of a power of $q$, approximately we want $\left|\log\left(p^a/q^b\right)\right|\le 0.005$, then we would expect to find $2N\log(1.005)/\log(q)$ close pairs.

Below are some charts showing this estimate and the actual number of pairs of exponents that give powers within 0.005 for pairs of primes $2\le p<q \le 29$. The x-axis enumerates the prime pairs, starting at $(2,3)$ and ending at $(23,29)$. The 17th entry showing a count of 2 in the first chart is $(3,17)$.

Close pairs with N=100Close pairs with N=1000Close pairs with N=10000

Note that the above argument does not rely on $p,q$ being primes, only that $\log(p)/\log(q)$ is irrational. Here are tables for $N=100$ and $N=10000$ for a few sets of primes as well as $(2,\pi)$ and $(\zeta(3),\mathrm{e})$.

$$ \begin{array}{|c|c|ccc|} p & q & Best & |\log| & \#\{|\log|\le 0.005\} & Expected \\ \hline 2 & 3 & 2^{84} \sim 3^{53} & 0.0021 & 1 & 0.9 \\ 2 & 5 & 2^{65} \sim 5^{28} & 0.0097 & 0 & 0.6 \\ 5 & 13 & 5^{51} \sim 13^{32} & 0.0030 & 1 & 0.4 \\ 3 & 17 & 3^{49} \sim 17^{19} & 0.0009 & 2 & 0.4 \\ 13 & 17 & 13^{95} \sim 17^{86} & 0.0138 & 0 & 0.4 \\ 11 & 23 & 11^{17} \sim 23^{13} & 0.0028 & 1 & 0.3 \\ 17 & 29 & 17^{82} \sim 29^{69} & 0.0199 & 0 & 0.3 \\ 1229 & 1381 & 1229^{62} \sim 1381^{61} & 0.0009 & 1 & 0.1 \\ 2 & \pi & 2^{71} \sim \pi^{43} & 0.0099 & 0 & 0.9 \\ \zeta(3) & \mathrm{e} & \zeta(3)^{38} \sim \mathrm{e}^{7} & 0.0067 & 0 & 1.0 \\ \hline \end{array} $$

$$ \begin{array}{|c|c|ccc|} p & q & Best & |\log| & \#\{|\log|\le 0.005\} & Expected \\ \hline 2 & 3 & 2^{1054} \sim 3^{665} & 0.00004 & 90 & 90.8 \\ 2 & 5 & 2^{9297} \sim 5^{4004} & 0.00006 & 62 & 62.0 \\ 5 & 13 & 5^{9551} \sim 13^{5993} & 0.000002 & 38 & 38.9 \\ 3 & 17 & 3^{5965} \sim 17^{2313} & 0.00016 & 37 & 35.2 \\ 13 & 17 & 13^{1637} \sim 17^{1482} & 0.00008 & 34 & 35.2 \\ 11 & 23 & 11^{4489} \sim 23^{3433} & 0.00024 & 30 & 31.8 \\ 17 & 29 & 17^{2875} \sim 29^{2419} & 0.00025 & 28 & 29.6 \\ 1229 & 1381 & 1229^{7813} \sim 1381^{7687} & 0.00012 & 16 & 13.8 \\ 2 & \pi & 2^{9217} \sim \pi^{5581} & 0.00007 & 86 & 87.1 \\ \zeta(3) & \mathrm{e} & \zeta(3)^{1641} \sim \mathrm{e}^{302} & 0.00008 & 98 & 99.8 \\ \hline \end{array} $$

It doesn't seem that the number of close pairs is more than expected. For $N=100$ and a 0.005 cutoff the average count is slightly less than we might expect from the asymptotics, but by $N=10000$ the observed match the model quite closely.