Collection of formulae for Euler’s constant γ
Xavier Gourdon and Pascal Sebahnumbers.computation.free.fr/Constants/constants.html
November 11, 2008

1Integral formulae

Euler’s constant γ appears in many integrals (often related, for example, tothe gamma function or the logarithmic integral function), we propose here toenumerate a selection of such integrals. Some of those can be deduced fromothers by elementary changes of variable.
We use the notation bxc for the floor function and {x} for the fractional partof a real number x.
Z ∞Z ∞t − btc{t}1−γ =dt=dt
2tt211Z ∞−γ =e−t log tdt = Γ0 (1)0Z ∞π2γ2 +=e−t log2 t dt = Γ(2) (1)(Euler-Mascheroni)
60Z ∞γπ 2−γ 3 −− 2ζ(3) =e−t log3 t dt = Γ(3) (1)(Euler-Mascheroni)
20Z 1
1
γ = −log log dt
t0Z ∞2γ + 2 log 2 = −4 π −1/2
e−t log t dt¶µ 0
Z ∞11−tγ =e−dt
1 − e−tt0¶2Z ∞µ111log 2π − γ −=−dt([4])
2et − 1t0¶
Z 1µ11+dt
γ =tlog(1 − t)0
¶Z ∞µ1dt
γ =− e−t1+tt0¶Z ∞µ1dt
γ =− cos t21+tt01

Z ∞

γ

=

(α − β)γ

=

γ

=

γ

=

γ

=

γ

=

γ

=

γ

=

γ

=

γ

=log(1 + e−t )etdt(Prévost [11])t2 + π 2−∞
Z ∞ −tαβe− e−tαβdt
α > 0, β > 0t0
Z 1Z 11−x−dxdy(Sondow [15])(1−xy)
log(xy)00
Ã∞!
Z 1X k121−tdt(Catalan)
0 1+t
k=1
Ã∞!
Z 1X k
1 + 2t1−t3dt(Ramanujan [13])20 1+t+tk=1
Z ∞1t dt+2(Hermite)
2 + 1)(e2πt − 1)2(t0Z ∞
1
12t dt1+− log n +1 + + ··· +222n − 1 2n(t + n )(e2πt − 1)
0Z 1
1 − e−t − e−1/t(Barnes [1])dtt0Z xZ ∞1 − cos t
cos t
dt −dt − log xx>0tt0xZ x
Z ∞ −t1 − e−tedt −dt − log xx>0tt0x

This last integral is often used to deduce an efficient algorithm to computemany digits of γ (see [6]).

2Series formulae

In this section we provide a list of various series for γ.

2.1

Basic series
γ

=γ

=γ

=γ

=lim

n→∞

Ã n
X1
k=1k!
− log n(Euler)

Xµ1

µ
¶¶
1+ log 1 −(Euler)
kk
k≥2
µ¶
2k + 2π X 1− 2 loglog +4k
2k + 1k≥1
Ã n!
X1 1lim− log (n(n + 1))(Cesaro)n→∞k 21+k=12γ=γ=γ=γ=

γ=γ=

γ

=

Ã nX!
2
lim− log(4n)n→∞2k − 1k=1
Ã nµ¶!
X1 11
lim− log n2 + n +n→∞k 23k=1Ã nÃµ!!
¶2X1 1112lim− log
n +n+−n→∞
k 4
345
k=1
µ µ¶
¶
(n − 1) (n − 1) (n − 2)+
lim 2 1 ++···−log(2n)n→∞2n3n2µ¶X 11lim+− k(Sondow [14])skss→1k≥1µµ ¶¶1(Demys)
lim n − Γn→∞nlog klog 21 X(−1)k+2log 2k(Kruskal [9])k≥2The last alternating series may be convenient to estimate Euler’s constantto thousand decimal places thanks to convergence acceleration of alternatingseries (see the related essay at [6]).
2.1.1

Ramanujan’s approach

In Ramanujan’s famous notebooks, we find another kind of Euler-Maclaurin like
asymptotic expansion; he writesnX
1
k=1

k−

1
1
1
11
log (n(n + 1)) ≈ γ +−+−
2
12p 120p2
630p3
1680p4(1)

with the variable p = 21 n(n + 1), which extends Cesaro’s estimation. This representation may also be deduced from the classical Euler-Maclaurin expansion
with Bernoulli’s numbers.

2.2

Around the zeta function

When he studied γ, Euler found some interesting series which allow to compute
it with the integral values of the Riemann zeta function. He used one of thoseto give the first estimation of his constant (a five correct digits approximation).
There are many formulae giving γ as function of the Riemann zeta function
ζ(s), some are easy to prove. We provide the demonstration of one example.
By definition, we may write!
Ã nµ¶¶
Xµ1
X1
k−1− log n = 1 ++ log
γ = limn→∞kkkk≥2k=13

= 1+¶¶µ1+ log 1 −kkXµ1
k≥2

and using the series for log(1 − x) when x = k1 < 1 gives


X X 1

γ =1−
`k `k≥2`≥2

then by associativity of this positive sum
X1 X 1X1=1−(ζ(`) − 1) .
γ =1−``k`
`≥2

k≥2

`≥2

So we have ve just demonstrated a first relation between γ and the zeta functions. Because it is clear that ζ(`) − 1 is equivalent to 1/2` when ` becomeslarge, some of those series have geometric convergence (of course one has toevaluate ζ(`) for different integral values of `).
A general improvement can be made if we start the series with k > 2 bycomputing its first terms, that is, for any integer n > 1:
µ¶¶
µ¶¶
n µ
XX µ1
1
k−1
k−1
γ =1++ log++ log
kkkk
k=2

k≥n+1

and the result now becomesµ¶¶ X µ¶
n µX1
k−1
111
γ =1++ log−ζ(`) − 1 − ` − · · · − ` ,kk`
2nk=2

`≥2

and this timeζ(`, n + 1) = ζ(`) − 1 −1
1
1− ··· − ` ∼2`n(n + 1)`

so that the rate of convergence is better. This function ζ(s, a) is known as theHurwitz Zeta function. For different values of n, the identity for γ gives¶
X1µ31n = 2
γ = − log 2 −ζ(`) − 1 − `2
`2
`≥2µ¶
X1
1
1
11− log 3 −ζ(`) − 1 − ` − `n = 3γ=6`23`≥2...
or in term of ζ(s, a) and the harmonic number Hn
γ = Hn − log n −X ζ(`, n + 1)
`≥24

`

.

(2)

2.2.1

Zeta seriesγ= 1−X ζ(k) − 1γ

X (k − 1)(ζ(k) − 1)=(Euler)kk≥2γ(Euler)kk≥2= 1−log 2 X ζ(2k + 1) − 1−
22k + 1k≥1γ

X ζ(2k + 1) − 1= log 2 −k+1µ ¶ X
ζ(2k + 1) − 1
3= 1 − log
−24k (2k + 1)k≥1γ

(Euler-Stieltjes)k≥1γ= 2 − 2 log 2 −X ζ(2k + 1) − 1(k + 1)(2k + 1)(Glaisher)k≥1γ

X=(−1)kk≥2γζ(k)k= 1 − log 2 +(Euler)X(−1)kk≥2γ=

ζ(k) − 1kX
3
ζ(k) − 1− log 2 −(−1)k (k − 1)2k(Flajolet-Vardi)

k≥2

γ

=

ζ(k) − 1
51X(−1)k (k − 2)
− log 2 −42kk≥3γ= log(8π) − 3 + 2µγ

2.3γ= 1 + log=X=`2`+1X−1
k=2`

log 2 −X`≥1γ(−1)kk≥2+2X

ζ(k) − 1k+1(−1)kk≥2

ζ(k) − 12k kOther series

`≥1γ

169π¶

X=X
k≥1(−1)k(−1)kk1
22`(Vacca [17], Franklin [5])3` −1)(X13k= 21 (3`−1 +1)

blog2 kck(3k) − 3k(Vacca [17])5(Ramanujan [2])

Ã
1−γ

=

γ

=

lim

n→∞

X ak
k≥1

γ=!
n1 X nno
nk(Kluyver)k

1 − log 2 +X
k≥1

γ

=n−1
X
k=1

(de la Vallée Poussin [18])k=1akk(k + 1)

(Kluyver)X
1− log n + (n − 1)!
kµk≥1akk(k + 1) · · · (k + n − 1)¶(Kluyver [8])In Kluyver’s formulae the ak are rational numbers defined by:

a1 =

1,
2k−1

ak =

1 X k−`ak−`k+1`(` + 1)`=1

1and 0 < ak ≤ k+1. Here are the first values:

11
1
19
3863
275
,a =,a =,a =,a =,a =,a =.
2 2
12 3
24 4
720 5
160 660480 724192
Kluyver’s last relation may be used to compute a few thousand digits of γ.
a1 =3

Euler’s constant and number theory

3.1

Dirichlet estimation

In 1838, Lejeune Dirichlet (1805-1859) showed that the mean of the divisors
function d(k) (numbers of divisors of k, [7]) of all integers from 1 to n is suchasµ¶n1X1d(k) = log n + 2γ − 1 + O √.
nn
k=1

For example, a direct computation with n = 105 produces
n1Xd(k) − log n = 0.1545745350...
nk=1while 2γ − 1 = 0.1544313298....

3.2

Mertens formulae

If p represents a prime number, Franz Mertens (1840-1927) gave in 1874 the twobeautiful formulae ([10], [7]):µ¶−111 Y
1−(3)eγ = limn→∞ log npp≤n66eγ
π2=1 Yn→∞ log nlimp≤n¶µ11+p

The product (3) is equivalent to the series
µ¶X1γ = lim − log 1 −− log log n
n→∞
p(4)

(5)

p≤n

but when p is largeµ¶µ ¶111− log 1 −= +O
ppp2
and the relation (5) for γ is very similar to its definition relation, but this time,
only the prime numbers are taken into account in the sum.

3.3Von Mangoldt function

The von Mangoldt function Λ(k) is generated by mean of the Zeta function as
follow [7]:−

ζ 0 (s) X Λ(k)=,ζ(s)
kss>1(6)k≥1and it is also defined by½
Λ(k) = log p if k = pm for any prime p,
Λ(k) = 0 otherwise.
The relation (6) may also be written as
ζ(s) +X Λ(k) − 1
ζ 0 (s)
=−,
ζ(s)
kss>1

k≥1

from which, by taking the limits as s tends to 1, we deduce the interesting series
expansion:
γ=−1 X Λ(k) − 1.
2k(7)

k≥1

It is a very slow and irregular converging series, partial sums Sn with n terms
areS1,000
S10,000= 0.57(835...),= 0.57(648...),

S100,000= 0.57(694...),= 0.577(417...).

S1,000,000

74Approximations

Unlike the constant π, few approximations are available for γ, it may be useful
to list a few of those.

4.1

Rational approximations

The continued fraction representation makes it easy to find the sequence of thebest rational approximations:γ = [0; 1, 1, 2, 1, 2, 1, 4, 3, 13, 5, 1, 1, 8, 1, 2, 4, 1, 1, 40, 1, 11, 3, 7, 1, 7, 1, 1, 5, 1, 49, 4, 1, 65, ...],
that is, in term of fractions·¸
1 3 4 11 15 71 228 3035 15403 18438 33841 289166 323007
0, 1, , , , , ,,,,,,,,, ... .
2 5 7 19 26 123 395 5258 26685 31943 58628 500967 559595

For example, by mean of the continued fractions, we get the two approximativevalues¯¯¯ 33841¯−11¯¯¯ 58628 − γ ¯ < 3.2 × 10and¯¯¯ 376566901¯−19¯¯¯ 652385103 − γ ¯ < 2.0 × 10 .
A more exotic fraction due to Castellanos [3] is¯¯¯¯ 9903 − 553 − 792 − 42¯− γ ¯¯ < 3.8 × 10−15 .
¯
570

4.2

Other approximations
γ

≈γ

≈γ

≈γ

≈

1
√ = 0.577(350...)3√
41 − 1241= 0.57721(700...)q10√
366 + 6 = 0.577215(396...)
43
√ ´
59 ³
1 + 11 7 = 0.577215664(894...)
3077
8

µγ

≈µγ

≈γ

≈γ

≈γ

≈γ

≈γ

≈

783

¶2/9= 0.577215(209...)(Castellanos [3])¶1/6803 + 92
= 0.577215664(572...)(Castellanos [3])614
4√
= 0.57721(411...)2 3 + 5 log 23= 0.5772(311...)
3 + 2 log 3µ ¶7371
log
= 0.57721566(601...)
293
7µ ¶
16
5+ log= 0.57721566(525...)
241
33696
log (840) = 0.5772156649015(627...)43115

References[1] E.W. Barnes, On the expression of Euler’s constant as a definite integral,
Messenger, (1903), vol. 33, pp. 59-61[2] B.C. Berndt and T. Huber, A fragment on Euler’s constant in Ramanujan’s
lost notebook, (2007)[3] D. Castellanos, The Ubiquitous Pi. Part I., Math. Mag., (1988), vol. 61,
pp. 67-98[4] S. Finch and P. Sebah, Comment on ”Volumes spanned by random points
in the hypercube”, to appear in Random Structures and Algorithms, (2008)[5] F. Franklin, On an expression for Euler’s constant, J. Hopkins circ., (1883),
vol. 2, p. 143[6] X.
GourdonandP.
Sebah,
Numbers,Constants
andComputation,
World
WideWebsiteattheadress:
http://numbers.computation.free.fr/Constants/constants.html,(1999)[7] G.H. Hardy and E.M. Wright, An Introduction to the Theory of Numbers,
Oxford Science Publications, (1979)[8] J.C. Kluyver, De constante van Euler en de natuurlijhe getallen, Amst.
Ak., (1924), vol. 33, pp. 149-151[9] M.D. Kruskal, American Mathematical Monthly, (1954), vol. 61, pp. 392397[10] F. Mertens, Journal für Math., (1874), vol. 78, pp. 46-62
9

[11] M. Prévost, A Family of Criteria for Irrationality of Euler’s Constant,preprint, (2005)[12] S. Ramanujan, A series for Euler’s constant γ, Messenger, (1916), vol. 46,
p. 73-80[13] S. Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa,New Delhi, (1988)[14] J. Sondow, An antisymmetric formula for Euler’s constant, Mathematics
Magazine, (1998), vol. 71, number 3, pp. 219-220[15] J. Sondow, Criteria for irrationality of Euler’s constant, Proc. Amer. Math.
Soc., (2003), vol. 131, pp. 3335-3344
P∞[16] T.J. Stieltjes, Tables des valeurs des sommes Sk = n=1 n−k ,Acta Mathematica, (1887), vol. 10, pp. 299-302[17] G. Vacca, A New Series for the Eulerian Constant, Quart. J. Pure Appl.
Math, (1910), vol. 41, pp. 363-368[18] C. de la Vallée Poussin, Sur les valeurs moyennes de certaines fonctions
arithmétiques, Annales de la société scientifique de Bruxelles, (1898), vol.
22, pp. 84-90

10