In a thread in MSE I proposed an older routine of mine for the efficient computation of coefficients; I use a very similar routine for the quick&dirty computation of the Stieltjes-constants.

This motivated me to try to improve my earlier toy-computations to calculate now the first 512 Stieltjes to 1000 dec digits precision. I'm unable to estimate the number of correct digits by analytical arguments; at least wolframalpha allowed me to display StieltjesGamma[511] to 400 digits, which met my own computations.

The only freely available table around seems to be that of S. Plouffe (linked via wikipedia) but they display only the first 78 numbers to 256 digits precision.

Update2: This is the effective formula to which the Pari/GP code reduces:

Let $ \qquad h_c = {1\over c!} \sum_{k=0}^\infty (-1)^k {\ln(1+k)^c\over1+k}$ This is done using the sumalt-procedure.

Next let $ \qquad r_c = - {\ln(2)^{c-1}\over c!} b_c$ where $b_c$ are the bernoulli numbers

Then $ \qquad \gamma_c = c! \sum_{d=0}^{c+1} h_d \cdot r_{c+1-d} $

So my question:

how could I possibly get an educated guess for the number of correct digits based on my Pari/GP-routine?*


is there some table with comparable precision around such that I can at least check the match for the first m digits (where m should optimally go to 1000)?

(here is the table with my current computations of 512 coeffs by 1000 digits)

Heuristically I find, that beginning with some precision, say $300$ dec digits at the first $\gamma_0$ , I simply lose one digit precision per step in the index, so in $\gamma_k$ are roughly $300-k$ digits correct, maybe a handful less.
For this I used differences when computed with precision $200,300,400,500,600,700$ from that with precision $800$, $\gamma_0$ had just nearly all leading digits constant, when precision was increased, so that was always correct to the full precision.
That would mean, that if I want $1000$ correct digits for $\gamma_{511}$ I need dec precision of (at least) $1550$ . Simple, if that is true...

Here is my routine. I reduced the precision-parameter so that this can just be copied & pasted to a Pari/GP-environment. For precision of 1000 dec digits and 512 coefficients this must be optimized due to exorbitant increase of stack and computation-time otherwise

Prepare computations with parameters for precision of computation

termsforseries = 32
digitstocompute = 200; digitstoshow = 12;

Compute the coefficients of the Laurent-expansion of the zeta by conversion from the same series-type of the eta-function (the alternating zeta)

\\ ========= Zeta Laurent-expansion providing Stieltjes-coefficients ====
ps_eta = sumalt(k=0,taylor((-1)^k/(1+k)^(1-x),x))

    tmp = Vec(1-2*2^(-(1-x)));
    tmp[1]=0; \\ make the first zero exact. this step is needed for
              \\ allowing the reciprocal of the powerseries

ps_zeta = ps_eta * ps_etatozeta \\ contains now the Stieltjes-coefficients

    tmp=Vec(ps_zeta);tmp=vector(#tmp-1,c,tmp[1+c]) \\ remove the first coefficient (at 1/x)
sti = vector(#tmp,r,tmp[r]*(r-1)!)  \\ extract Stieltjes-constants by mult with factorials

You could compare with the output from mpmath:

sage: import mpmath
sage: mpmath.mp.dps = 1000
sage: %time mpmath.stieltjes(511)
CPU times: user 123.17 s, sys: 0.02 s, total: 123.19 s
Wall time: 123.40 s

This only seems to agree with your result up to about 715 digits. Mathematica 8 agrees with mpmath, so presumably you will need to increase the precision in your algorithm.

  • $\begingroup$ Ah, thanks; I'll see whether I can find something about the implementation in mpmath. $\endgroup$ – Gottfried Helms Aug 26 '12 at 17:14
  • $\begingroup$ The algorithm is described here: mpmath.googlecode.com/svn/trunk/doc/build/functions/… Specifically, it does numerical integration. $\endgroup$ – Fredrik Johansson Aug 26 '12 at 17:39
  • $\begingroup$ @Fredrik: Well, very nice, indeed! That made it immediately into my bookmarks; thank you very much! I'll see what I can take from it... $\endgroup$ – Gottfried Helms Aug 26 '12 at 20:49
  • $\begingroup$ @Fredrik: I added some heuristic for the achievable precision to my original question. $\endgroup$ – Gottfried Helms Aug 26 '12 at 22:28
  • $\begingroup$ @Fredrik: I've re-computed the 1000-digit version with prec 1600 and uploaded to the given link; the last entry matches now exactly your reference where the last digit is rounded upwards (you have 3 digits more). So I seem to have at least a rough estimate for the lower bound of computational requirements... $\endgroup$ – Gottfried Helms Aug 26 '12 at 22:59

I have recently computed a large table of rigorous values of the Stieltjes constants. Thanks to some coding by Jon Bober, the table can be browsed using a web interface on LMFDB.org (the L-functions and modular forms database):


For any $n \le 10^5$, the web interface allows printing $\gamma_n$ to at least 10000 digits (over 30000 digits for small $n$). The raw data (huge files) can also be downloaded.


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.