Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Going through Derbyshire's Prime Obsession & trying to take LogIntegral of 20^ZetaZero[1] & comes up with a value of 1.99797 - 3.91384 I instead of -0.105384 + 3.14749 I quoted in the book. Am I doing something wrong?

Is it something to do with discrepancy between American definition of LogIntegral & European?

share|improve this question
up vote 6 down vote accepted

Please note the chapter on the zeta function in Wagon's Mathematica In Action, where he refers to a book by H.M. Edwards called Riemann's Zeta Function. Wagon cautions thatExpIntegralEi[r Log[x]]must be used instead ofLogIntegral[x^r]when x is real and r is complex. This is because the complex log function returns r Log[x]-2 Pi n i, withnchosen to make the imaginary part lie between -Pi and Pi, which leads to incorrect sums. For example,

N[ExpIntegralEi[ZetaZero[1] Log[20]]]

returns -0.105384 + 3.14749 I

share|improve this answer
Thank you for that reference & the explanation :) – martin Mar 2 '14 at 20:35
... Just looked at it on Amazon - think I need to buy a copy – martin Mar 2 '14 at 20:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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