8

"Primes are the most arbitrary and ornery objects studied by mathematicians: they grow like weeds among the natural numbers, seeming to obey no other law than that of chance, and nobody can predict where the next one will sprout..." - D. Zagier

"Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the human mind will never penetrate." - Leonhard Euler

Claim: The Pattern of Prime Numbers

For $k \geq 3$, the $k$-th prime $p_k$ can be predicted from the previous primes $p_1, p_2, \dots, p_{k-1}$ using:

$$ p_k = \left\lceil \left( 1 - \frac{1}{\zeta(s) \cdot \prod_{j=1}^{k-1} \left( 1 - p_j^{-s} \right)} \right)^{-\frac{1}{s}} \right\rceil $$

where $s = k \cdot \ln\bigl(k \ln(k)\bigr)$ and $\zeta(s)$ is the Riemann zeta function.


Examples

$$ \boxed{\small p_{6} = \left\lceil \left(1 - \frac{1}{\zeta\left(6 \cdot \ln\left(6 \cdot \ln(6)\right)\right) \cdot \prod_{j=1}^{5} \left(1 - p_j^{-6 \cdot \ln\left(6 \cdot \ln(6)\right)}\right)}\right)^{-\frac{1}{6 \cdot \ln\left(6 \cdot \ln(6)\right)}} \right\rceil = 13} $$

$$ \boxed{\small p_{10} = \left\lceil \left(1 - \frac{1}{\zeta\left(10 \cdot \ln\left(10 \cdot \ln(10)\right)\right) \cdot \prod_{j=1}^{9} \left(1 - p_j^{-10 \cdot \ln\left(10 \cdot \ln(10)\right)}\right)}\right)^{-\frac{1}{10 \cdot \ln\left(10 \cdot \ln(10)\right)}} \right\rceil = 29} $$

$$ \boxed{\small p_{2000} = \left\lceil \left(1 - \frac{1}{\zeta\left(2000 \cdot \ln\left(2000 \cdot \ln(2000)\right)\right) \cdot \prod_{j=1}^{1999} \left(1 - p_j^{-2000 \cdot \ln\left(2000 \cdot \ln(2000)\right)}\right)}\right)^{-\frac{1}{2000 \cdot \ln\left(2000 \cdot \ln(2000)\right)}} \right\rceil = 17389} $$

$$ \boxed{\small p_{4000} = \left\lceil \left(1 - \frac{1}{\zeta\left(4000 \cdot \ln\left(4000 \cdot \ln(4000)\right)\right) \cdot \prod_{j=1}^{3999} \left(1 - p_j^{-4000 \cdot \ln\left(4000 \cdot \ln(4000)\right)}\right)}\right)^{-\frac{1}{4000 \cdot \ln\left(4000 \cdot \ln(4000)\right)}} \right\rceil = 37813} $$

  • The Answer to the Ultimate Question of Life, the Universe, and Everything is the $42^{\text{nd}}$ prime.

Proof

The Euler product formula for the Riemann zeta function states:

$$ \zeta(s) = \prod_{p \, \text{prime}} \left( 1 - p^{-s} \right)^{-1} \quad ❤ $$

Its reciprocal is:

$$ \prod_{p \text{ prime}} \left( 1 - p^{-s} \right) = \frac{1}{\zeta(s)} $$

We split the product at the $k$-th prime $p_k$:

$$ \prod_{p \,\text{prime}} (1 - p^{-s}) = \prod_{j=1}^{k-1} \bigl(1 - p_j^{-s}\bigr) \cdot \prod_{p \ge p_k} \bigl(1 - p^{-s}\bigr) $$

Hence,

$$ \prod_{j=1}^{k-1} \bigl(1 - p_j^{-s}\bigr) \cdot \prod_{p \ge p_k} \bigl(1 - p^{-s}\bigr) = \frac{1}{\zeta(s)} $$

For large $s$, approximate the tail product:

$$ \prod_{p \geq p_k} \left( 1 - p^{-s} \right) \approx 1 - p_k^{-s} \tag{1} $$

Substituting,

$$ \left( \prod_{j=1}^{k-1} \left(1 - p_j^{-s}\right) \right) \cdot \left(1 - p_k^{-s}\right) \approx \frac{1}{\zeta(s)} $$

Thus,

$$ 1 - p_k^{-s} \approx \frac{1}{\zeta(s) \cdot\prod_{j=1}^{k-1} \bigl(1 - p_j^{-s}\bigr)} $$

Solving for $p_k$ gives:

$$ p_k \approx \left( 1 - \frac{1}{\zeta(s) \cdot\prod_{j=1}^{k-1} \bigl(1 - p_j^{-s}\bigr)} \right)^{-1/s} $$

We now apply the ceiling function for exactness:

$$ p_k = \left\lceil \left( 1 - \frac{1}{\zeta(s) \cdot \prod_{j=1}^{k-1} \left( 1 - p_j^{-s} \right)} \right)^{-\frac{1}{s}} \right\rceil \tag{2} $$

Derivation of $s$ using the Prime Number Theorem:

$$ p_k \sim k \ln k $$

Substituting into $p_k^{-s}$:

$$ p_k^{-s} \sim (k \ln(k))^{-s} $$

Taking the natural logarithm:

$$ \ln\left( p_k^{-s} \right) \sim \ln\left( (k \ln(k))^{-s} \right) $$

yields:

$$ \ln\left( p_k^{-s} \right) \sim -s \cdot \ln(k \ln(k)) $$

For large $s$, this implies:

$$ -s \cdot \ln(k \ln(k)) \ll 0 $$

or equivalently:

$$ s \gg \frac{1}{\ln(k \ln(k))} $$

Choosing $s$ proportional to $k$, we arrive at:

$$ s \sim k \cdot \ln(k \ln(k)) \tag{3} $$

$\blacksquare$


Questions

I've marked the above proof with three heuristic steps $(1),(2),(3)$ that need rigorous justification.

  • Step $(1)$ Approximating the infinite tail by a single factor:

$$ \prod_{p \geq p_k} \left( 1 - p^{-s} \right) \approx 1 - p_k^{-s} $$

It seems very blunt to replace the entire product by just one factor?

  • Step $(2)$ Taking the ceiling is exact only if the real-valued approximation lies within

$$ (p_k - 1,\,p_k] $$

Is there a way to ensure the approximation falls strictly in that interval?

  • Step $(3)$ Suboptimal value for $s$

$$ s \sim k \cdot \ln(k \ln(k)) \tag{3} $$

Experimenting with other values such as $s \sim 2 \cdot k \cdot \ln(k \ln(k))$ also appears to work?

I welcome any feedback, suggestions, or corrections. Thanks!


References

vengy
  • 2,421
  • 2
    Feedback: you have linked to feedback already, see here, with the answers, e.g., by user65203. Also, your related previous question has feedback. – Dietrich Burde Jan 08 '25 at 20:52
  • 2
    You are welcome. It seems you have done a lot of nice work and you can enjoy it. Many excellent mathematicians have worked on the distribution of prime numbers, over several hundreds years. So one should be aware that this is a difficult topic. But I suppose, you have heard this, too. – Dietrich Burde Jan 08 '25 at 21:32

1 Answers1

4

(3) Larger $s$ make the tail increasingly smaller than the $p_k$ and so work better. Your $s$ is close to the best since you can’t make it much smaller without breaking the formula.

(2) Your naive computation gives exactly $p_k$ you can see that the terms you’re dropping make the expression smaller, so it’s going to be less than $p_k$. Bounding them will let you confirm it’s within $1$.

(1). Taking log, the contribution from the tale is approximately at most $\sum_{n>p_k} n^{-s}<\int_{p_k+1}^{\infty} x^{-s}dx=(p_k+1)^{1-s}/(1-s)\approx - p_k^{-s} e^{-s/p_k} p_k/s$. For $s/p_k>1$, this is less than largest main term $p_k^{-s}$, so the final result will be at least $(2\times p_k^{-s})^{-1/s}=p_k\times 2^{-1/s}\approx p_k -\log{2}\times p_k/s>p_k-1$. I’ve done a lot of hand wavy approximations here - you can certainly do much better. I think $s/p_k$ can actually dip a bit below $1$ and allow the formula to still work.

Eric
  • 8,378
  • 2
    The relationship between primes and Reiman Zeta is well known and studied. I don’t think this formula is particularly useful on top of the existing knowledge base, though I personally find it neat. – Eric Jan 10 '25 at 14:01