Ask Your Question

Revision history [back]

First you need to install Odlyzko's database of zeta zeros. In a terminal, type:

$ sage -i database_odlyzko_zeta

The command

sage: zeta_zeros()

will then give you a list of the imaginary parts of the first 100,000 non trivial zeros of zeta. Note that as usual, the list is indexed from 0.

The information page about this package also warns: Note that only the first 9 digits after the decimal come from the database. Subsequent digits are the result of the inherent imprecision of a binary representation of decimal numbers. So you should have that in mind and check how this affects precision in your product.

Then you can do the following:

sage: def rho(k):
....:     return CC(0.5,zeta_zeros()[k])
sage: def a(x):
....:     return (CC(1.,0.)-x)*exp(x)
sage: def p(s,n):
....:     return prod(a(s/rho(k))*a(s/(CC(1.,0.)-rho(k))) for k in (0..n))
sage: p(0.5,2)
sage: p(0.5,20)
sage: p(0.5,200)
sage: p(0.5,2000)

If you plan to use large values of n, you might want to use Cython to speed up computation, but you should probably first check what precision the computations really give you.