# Sum of 1/primes for all primes

Maybe most of you have seen this before, but I find it cool and that's why I thought I share it with you. Lets look at the sum

$$\sum_{p\leq N}\frac{1}{p}$$

where p represents only prime numbers. If I calculate the value for this sum when taking into account all prime numbers < 105 the result is 2.705 and taking into account all prime numbers < 107 the result still is only 3.041. The obvious question now is: does this series converge to a fixed value, or does it diverge? Surprisingly (for me the first time I saw it), this series diverges for $$N\rightarrow\infty$$!

The proof was already known by Euler and goes like this:
Consider

$$\prod_{p\leq N}\left(1-\frac{1}{p}\right)^{-1}$$

where the product goes over all prime numbers $$p\leq N$$. Now we can use the geometrical series for (1 - 1/p)-1 = 1 + 1/p + 1/p2 + ... to find that

$$\prod_{p\leq N}\left(1-\frac{1}{p}\right)^{-1}=$$$$\prod_{p\leq N}\left(1+\frac{1}{p}+\frac{1}{p^2}+... \right)$$

(continued in post II)

Last edited:

When working out the right-hand side, we get a sum of terms of 1/n where n consists of prime numbers $$\leq N$$. More importantly, because of the unique prime factorisation for every n consisting of prime numbers $$\leq N$$ the term 1/n will occur in the summation! Therefore,

$$\prod_{p\leq N}\left(1+\frac{1}{p}+\frac{1}{p^2}+\cdots\right)\geq \sum_{n=1}^N \frac{1}{N}$$.

As the series on the right-hand side diverges for $$N\rightarrow\infty$$, it is concluded that the product on the left hand side also diverges.

Now for the final trick: use the fact that $$x>\frac12 \log(1/(1-x))$$ when $$0<x\leq 2$$ and you will see that:

$$\sum_{p\leq N}\frac{1}{p}>\frac12\sum_{p\leq N}\log\frac{1}{1-p^{-1}}=\frac12\log\left(\prod_{p\leq N}\left(1-\frac{1}{p}\right)^{-1}\right)$$

Now we are done, because the right-hand side diverges for $$N\rightarrow\infty$$ and therefore also the sum over the primes must do so!

The divergence is very very slow (as could already be seen from the examples at the top of this post): it goes roughly as log(log(N)). Actually, I cannot think of a well-known series that diverges even slower than this.

Anyway, I hope somebody liked this!

Last edited:
jcsd
Gold Member
That's odd, I was going to ask whetehr this series was divergent. I thought that it would add up to one as you can put the natural numbers on a one to one basis with the primes, however this was more of a wild guess.

How would you define a 1-1 relation between the prime numbers and the natural numbers? The prime numbers are randomly distributed over the natural numbers... And besides, the sum
$$\sum_{i=1}^\infty\frac{1}{i}$$
diverges quite fast.

As to your idea that they might sum up to 1: 1/2 + 1/3 + 1/5 = 31/30 > 1.

Cheers,
-Freek.

jcsd
Gold Member
Oops the series I was actually intrested in was:

$$\sum_{i=1}^{\infty}\prod_{i=1}^{n}\frac{1}{p_n}$$

Ignore that first post, does this series converge or diverge?

NateTG
Homework Helper
It converges. Consider that
$$\frac{\prod_{i=1}^{n}\frac{1}{p_n}}{\prod_{i=1}^{n+1}\frac{1}{p_n}}\h\geq 2$$
Since the first term is $$\frac{1}{2}$$ the total sum is bounded above by
$$\sum_{i=1}^{\infty}\frac{1}{2^i}=1$$
which is term-by-term larger than the prime product sum, and converges.

jcsd
Gold Member
I though that it would converge (as you've probably noticed it's the fraction of all natural numbers that aren't primes), but any idea to what (I orginally thought one, but that's just a guess)?

jcsd
Gold Member
Oops, i see now it must be less the one as your last post indicates.

NateTG
Homework Helper
Originally posted by jcsd
I though that it would converge (as you've probably noticed it's the fraction of all natural numbers that aren't primes), but any idea to what (I orginally thought one, but that's just a guess)?

The limit is definitely less than one:

1/2+1/6+1/30+1/210=(105+35+7+1)/210=148/210 -> .704...

So the limit will be close to .70...