While playing with Cohen's pari script prodeulerrat found a function.

For $s \in \mathbb{C}$ define $$ f(s) = \prod_{p \text{ prime}} (1-\frac{s^2}{p^2})$$

The product converges everywhere, no poles and the zeros are $\pm p$.

At integers one can tell if $f(n)=0$ via primality testing.

Cohen's script computes $f(s)$ in $O(|s|)$ and it iterates over primes.

Q1 Is there an alternative way to compute $f(s)$?

Q2 An explicit series converging to $f(s)$?


Q3 Is there closed form for $f$ at integers?


Complex plot:

  • $\begingroup$ Joro, the addtional values I found are: $f(0)=1$ and $f(i)=\sum_{n=1}^{\infty} \frac{|\mu(n)|}{n^{2}} =\frac{\zeta(2)}{\zeta(4)}$. Also note that $f(1-p)$ only has two single zeros at $p=3, p=-2$. Since your function has only zeros and no poles, what would be nice (but unlikely), is that your formula is a 'disguised' Weierstrass product of an entire function of the shape: $f(z) = z^m e^{g(z)} \prod_p^\infty E_{p_n}(z/a_n)$, i.e. an entire function that can be fully expressed by its infinite prime roots. The trick obviously is to find the right parameters... $\endgroup$
    – Agno
    Sep 6 '13 at 14:31
  • $\begingroup$ @Agno Thanks. Stopple's answer appear interesting, though slowly converging. Looks like the primality of say 11 depends on the factorization of numbers above 10^7. $\endgroup$
    – joro
    Sep 6 '13 at 14:51
  • 1
    $\begingroup$ @Agno: isn't the original definition already an (undisguised) Weierstrass product? $\endgroup$ Sep 6 '13 at 22:56
  • $\begingroup$ @Greg: agree. I guess it is an entire function in its current form already. $\endgroup$
    – Agno
    Sep 7 '13 at 13:50
  • $\begingroup$ @Joro. The difficult task is to find a function that has $s=\pm$ the primes as its roots. In this question, I asked something similar (scroll to the bottom): mathoverflow.net/questions/122582/… Maybe we could tweak Wilson's formula by adding a cosine and using $\Gamma(s)$ instead of the factorial. There are also other prime functions that become 1 or 0 if prime (mathworld.wolfram.com/PrimeFormulas.html). Maybe those using the Floor function could be simplified (eg using $\lfloor x \rfloor = x-\{x\}$). $\endgroup$
    – Agno
    Sep 7 '13 at 14:12

For Q2 I'm not sure what you expect other than the obvious series which comes from multiplying out the product: $$ f(s)=\sum_{n=1}^\infty \mu(n)\frac{s^{2\omega(n)}}{n^2} $$ where $\omega(n)$ is the number of distinct prime divisors of $n$.

  • $\begingroup$ Thanks. Your series doesn't converge quickly for me (though it is very good approximation for small |s|). $\endgroup$
    – joro
    Sep 6 '13 at 13:47
  • $\begingroup$ Hm, I can't compute $f(11)$ using your series, it is not near zero for $N=10^7$. Does this mean the primality of 11 is related to the factorization of numbers above $10^7$? $\endgroup$
    – joro
    Sep 6 '13 at 14:52
  • $\begingroup$ The series in powers of $s$ will automatically be the Taylor expansion at $0$, good for small $s$ only. $\endgroup$
    – Stopple
    Sep 6 '13 at 20:00
  • $\begingroup$ Since the average order of $\omega(n)$ is $\log(\log(n))$, letting $k=\log(\log(n))$ the series should behave roughly like $\sum_k s^{2k}/\exp(\exp(k))$. So I expect the radius of convergence to be infinite. $\endgroup$
    – Stopple
    Sep 7 '13 at 18:02

A standard method to improve the speed of convergence is to look for approximations, which can be explicitly evaluated. In this case one would take $f(s)\approx\zeta(2)^{-s^2}$. We have $$ f(s)\zeta(2)^{s^2} = \exp\left(\sum_p s^2\log (1-\frac{1}{p^2}) + \log(1-\frac{s^2}{p^2})\right). $$ Each summand is now of magnitude $\frac{s^4}{p^4}$, thus the speed of convergence has improved, since you have to add up primes substantially larger then $s$ anyway, unless you only look for very rough bounds.

If this is not enough, you can develop $\log(1-\frac{1}{p^2})$ and $\log(1-\frac{s^2}{p^2})$ into a Taylor series, and pull out another power of $\zeta$. The next term will probably give $\zeta(4)^{(s^4-s^2)/2}$, and the series should then converge like $\frac{s^6}{p^6}$.

At some point you will have to ask yourself whether the algebraic manipulations necessary to improve the convergence are worth the saving in computation time, the answer to this question of course depends on your application or interest.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.