On this page
In 1737 Leonhard Euler wrote down an identity that ties every whole number to the primes. It appears in his paper ‘Various observations about infinite series’ (written 1737, published 1744), which the Euler Archive at the University of the Pacific describes as the paper in which Euler product expansions first appeared. To follow it you need two ideas from school algebra: the geometric series, and the fact that every number factorises into primes in exactly one way.
What is the Euler product formula?
For real s > 1, the Euler product formula states that the sum of 1/nˢ over all positive integers n equals the product of 1/(1 − p⁻ˢ) over all primes p (MathWorld, Euler Product). The left side is the Riemann zeta function ζ(s); the right side mentions only primes.
How do you derive it from unique factorisation?
Each factor is a geometric series. Since p⁻ˢ is between 0 and 1, 1/(1 − p⁻ˢ) = 1 + 1/pˢ + 1/p²ˢ + …, just as 1/(1 − r) = 1 + r + r² + ….
Multiply the factors for 2 and 3. Each term of the result is 1/(2ᵃ3ᵇ)ˢ, so you get 1/nˢ for every n built from 2s and 3s only: 1, 2, 3, 4, 6, 8, 9, 12 and so on.
Bring in every other prime. Now every whole number appears, because every n > 1 is a product of primes.
Each n appears exactly once, because that factorisation is unique (the fundamental theorem of arithmetic). 12 shows up only as 2² × 3.
So the product over primes is the sum over all n. Multiplying infinitely many infinite series needs absolute convergence, which is why the formula is stated for s > 1 (Wikipedia, Euler product).
If the series side feels shaky, our posts on when 1/nᵖ converges and why the sum of 1/n² is π²/6 fill the gap.
Does it check out numerically at s = 2?
At s = 2 the left side is 1 + 1/4 + 1/9 + … = π²/6 ≈ 1.6449, a value Euler found in the 1730s (MathWorld, ζ(2)). On the right, each prime contributes p²/(p² − 1). Multiply them in one at a time:
p = 2: factor 4/3, running product 1.3333
p = 3: factor 9/8, running product 1.5000
p = 5: factor 25/24, running product 1.5625
p = 7: factor 49/48, running product 1.5951
p = 11: factor 121/120, running product 1.6083
p = 13: factor 169/168, running product 1.6179
Six primes already land within about 1.6% of π²/6. Each new factor is closer to 1, so the climb slows, as the diagram above shows.
Why does it prove there are infinitely many primes?
Euclid proved this in the Elements, Book IX, Proposition 20; Euler’s proof is different and rests on unique factorisation (Wikipedia, Euclid’s theorem). Take any N and multiply only the factors 1/(1 − 1/p) for primes p ≤ N. Expanding them gives 1/n for every n whose prime factors are all at most N, which includes every n from 1 to N. So that product is at least 1 + 1/2 + … + 1/N.
That harmonic sum grows without limit as N grows. With only finitely many primes, the product would stop changing once N passed the largest prime. It cannot do both, so the primes never run out.
Why does the sum of 1/p diverge?
Take logarithms of the same inequality. The log of a product is a sum, and for 0 < x ≤ 1/2, −ln(1 − x) ≤ x + x². So ln(1 + 1/2 + … + 1/N) is at most the sum over primes p ≤ N of (1/p + 1/p²).
The 1/p² part stays below π²/6. The left side grows without limit, so the sum of 1/p must too. Euler proved this in 1737, and Mertens later showed rigorously that the partial sums up to n grow like ln ln n (Wikipedia, divergence of the sum of the reciprocals of the primes). Primes thin out, yet they stay far more common than perfect squares, whose reciprocals add up to a finite number. Our explainer on how many primes lie below a number picks up that thread.
How should you practise this?
Expand the 2-and-3 product by hand and list which n up to 30 appear. Which are missing, and why?
Extend the s = 2 table to p = 19 (you should reach about 1.6280), then try s = 3 and notice how much faster the product settles.
Write the infinite-primes proof in five lines without looking, then check each inequality.
If you want the geometric series or the fundamental theorem of arithmetic laid out from the start, the Fermi Concept Library covers every concept in physics, chemistry, biology, mathematics and computing. When a step in a series proof keeps going wrong, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.



