 Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫  π  -¹ ² ³ °

You are not logged in.

## #26 2020-07-12 10:04:46

zetafunc
Moderator Registered: 2014-05-21
Posts: 2,261
Website

### Re: All primes formula

If
denote the prime numbers, then there exists a constant

and a sequence

such that
is the nth prime. It can be shown that this recurrence relation generates all the prime numbers -- however, the complexity of this problem (as is often the case with prime-generating constants) is determining the value of
to a sufficiently high degree of accuracy. The proof of this result uses Bertrand's postulate.

Here, I've used
to denote the floor of x (you can think of that as 'rounding down x to the nearest whole number') and
to denote the fractional part of x. So in other words, we'd have
and
.

The exact value of
can be represented as an infinite sum:

You need about 25 terms in the series above to get all the primes less than 100, for example.

Offline