by AnotherGoodName | 2025-10-08 15:11:42+00:00
That question is literally how you derive both the zeta function and the prime counting functions. It also makes for an easy statement of why they are clearly related.

It's very easy to explain too so bear with me on the following layman understandable explanation.

First consider in base 2 every prime is of the form 2n + 1. Ie. every prime is odd. That's pretty understandable right? Every number that's not odd is a factor of 2. I could state that at most, above 2, only half of numbers could possibly be prime.

Now lets do this with base 6 which is 2 x 3. Similarly to the above, in base 6 every prime is of the form 6n + 1 or 6n + 5. Every other form of 6n + [0,2,3,4] is going to be divisible by 2 or 3. This is just an extension of the above idea but we've done it with both 2 and 3 simultaneously. Now i can state that above 6 only 2/6 (1/3rd) of numbers could possibly be prime. Every other number is divisible by 2 or 3.

Base 10 is the above idea but we do it with 2 x 5. Only 10n + [1,3,7,9] are not divisible by 2 or 5.

Lets now continue this idea and also consider base 30. For 2 x 3 x 5 = 30 primes can only be of the form 30n + [1,7,11,13,17,19,23,29]. Any other number is a multiple of either 2,3 or 5. Here we see only 8/30 = 4/15ths numbers above 30 could possibly be prime.

So... what's the formula for how many numbers can possibly be prime? Well if we have factors of 2,3,5... we can first work with the 2 and rule out 1/2 of numbers being prime (above 2 only half of numbers can be prime). Then in the remaining 1/2 of numbers that can still be prime, we can rule out 1/3rd of those numbers possibly being prime. So 1/2 x 1/3 numbers can't possibly be prime. Since we want to state the numbers that COULD possibly be prime we can state the inverse of this fraction. The inverse of a fraction is (1 - fraction). So (1 - 1/2) x (1 - 1/3) = 2/6 = 1/3. Which matches the above. Only 1/3 of numbers above 6 can possibly be prime. Now what if we extended this fraction for more primes? (1 - 1/2) x (1 - 1/3) x (1 - 1/5) = 8/30 = 4/15 numbers above 30 could possibly be prime which again matches the example above. Let's continue (1-1/2) x (1-1/3) x (1-1/5) x (1-1/7) x (1-1/11) x (1-1/13).... This type of equation is known as an Euler product formula. This specific form which multiplys the inverse fractions of the primes like this is called the Reimann Zeta function. The link between the Reimann Zeta function and primes isn't a surprise. The question you asked is literally how you end up coming to the Reimann Zeta function - https://en.wikipedia.org/wiki/Riemann_zeta_function#Euler's_...

Anyway the next question you may have on your mind is what does this series converge to? We can see as you increase the number of primes you get smaller and smaller fractions; 1/2 to 1/3 to 4/15ths of numbers possibly being prime? Well the above is how you derive the prime counting function; https://en.wikipedia.org/wiki/Prime_number_theorem#Elementar... and the answer is that 1/log(x) numbers are possibly prime above a given x.

Hopefully this helps with understanding of the Riemann Zeta function and prime number theory in general. They are literally not that hard to understand in broad terms and the question you asked is exactly how the Zeta function came about.