Ask Your Question

Hadamard product for the Riemann zeta function

asked 2013-07-26 13:42:03 +0100

petropolis gravatar image

What is the best way to compute numerically with Sage the product over the first n nontrivial zeros of the Riemann zeta function?

p(s,n) = product((1-s/rho(k))*exp(s/rho(k)) for k in (1..n))

where zeta(rho(k)) == 0 and Im(rho(k)) != 0.

Wikipedia advises: "To ensure convergence the product should be taken over 'matching pairs' of zeroes, i.e. the factors for a pair of zeroes of the form rho(k) and 1-rho(k) should be combined."

Hadamard product on MathWorld

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-27 13:31:18 +0100

slelievre gravatar image

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.

edit flag offensive delete link more


Nice. Thanks!

petropolis gravatar imagepetropolis ( 2013-07-27 15:12:01 +0100 )edit

If you need more precision but not too high `n`, [Odlyzko's tables]( include one of imaginary parts of the first 100 zeros of the Riemann zeta function, accurate to over 1000 decimal places.

slelievre gravatar imageslelievre ( 2013-07-28 18:04:56 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-26 13:42:03 +0100

Seen: 674 times

Last updated: Jul 27 '13