Prime Zeta without Möbius Function and Prime Summation

316 Views Asked by At

The prime zeta function can be expressed inversely in terms of the Riemann zeta function:

$$P(s)=\sum_{k=1}^\infty\frac{\mu(k)}{k} \ln[\zeta(ks)]$$

The equation is defined here. The Mathworld page also defines other ways it can be expressed in terms of the Riemann Zeta function, but they are expressed where $\ln[\zeta(s)] = \mathrm{etc}$, not $P(s)=\mathrm{etc}$.

Can this be rewritten to not use the Möbius ($\mu$) Function and without prime summation ($\sum_{p}$)?


I am using this in a C++ program. I am using the Boost libraries, so I can use the zeta function (but Boost does not have the prime zeta function). It also does not have the Mobius function. This is why I cannot really use the Mobius function like in the equation above.

As well, to use prime summation (or similarly product of primes), I have to generate a large vector of primes (not optimal). This is why I cannot really use prime summation (or product of primes, I suppose).

1

There are 1 best solutions below

3
On BEST ANSWER

So your question seems to be: how can you program the prime zeta function in C++?

The easiest way would be to use an existing implementation in C++ or C. For example, I have one here PARI-extensions using the PARI library.

If you would prefer to write your own version using Boost, then you could re-implement my code (you'll probably want the primezeta_real function) using Boost instead of the PARI library. You would also need to write the Lambert W function, but that is not difficult and doesn't need to be done with high precision (it's used to determine how long you need to iterate a loop).

If you want to do a better job, you should read Cohen's High precision computation of Hardy-Littlewood constants which explains an efficient method. But the paper would be hard to follow for someone without a math background.