Euler-Mascheroni Constant

Author

Eric W. Weisstein
April 26, 2024

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Constants/Euler-MascheroniConstant.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Euler-MascheroniConstant.html.

©2024 Wolfram Research, Inc. except for portions noted otherwise

Notation

EulerGamma//TraditionalForm

<<Utilities`Typesetting`

EulerGamma//TraditionalForm

Definition

(lim_(m->∞)) ((∑_(n=1)^m)(1/n)-log(m))

-Log[m]+Sum[1/n,{n,m}]

Limit[%,m->∞]

Nested radical

<<Utilities`Plot`

J. Sondow (May 13, 2003)

Product[(k+1)^((-1)^(k+1) Binomial[n-1,k]),{k,0,n-1}]

Table[Product[(k+1)^((-1)^(k+1) Binomial[n-1,k]),{k,0,n-1}],{n,4}]

SondowTerms[max_]:=Table[Times@@Table[(k+1)^((-1)^(k+1) Binomial[n-1,k]),{k,0,n-1}]^(1/n),{n,2,max}]
NSondowTerms[max_]:=Table[Times@@Table[(k+1`20)^((-1)^(k+1) Binomial[n-1,k]),{k,0,n-1}]^(1/n),{n,2,max}]

SondowTerms[10]//TraditionalForm

NSondowTerms[10]

E^EulerGamma//N

With[{max=32},
IntegerListPlot[FoldList[Times,1,NSondowTerms[max]//N],
Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{max,#}}]&[Exp[EulerGamma]]},
PlotRange->{Automatic,{1,1.8}},
AxesLabel->TraditionalForm/@{n,r[n]}
]
]//Timing

Identities (Havil 2003, p. 109)

Integrals

v5

-Integrate[Exp[-x]Log[x],{x,0,∞}]

-Integrate[Log[Log[1/x]],{x,0,1}]

Integrate[Exp[-x]((1/(1-Exp[-x]))-(1/x)),{x,0,∞}]

Integrate[(1/x)((1/(1+x))-Exp[-x]),{x,0,∞}]

Integrate[1/Log[x]+1/(1-x),{x,0,1}]

Integrate[Exp[-x^2]Log[x],{x,0,∞}]

Integrate[Exp[-x]Log[x]^2,{x,0,∞}]

Integrate[FractionalPart[x]/x^2,{x,1,∞}]

{NIntegrate[FractionalPart[x]/x^2,{x,1,2,3,4,5,∞},WorkingPrecision->20,MaxRecursion->15],1.-EulerGamma}

Limits

v5

Limit[n-Gamma[1/n],n->∞]

Sum[1/n^x-1/x^n,{n,∞}]//Simplify

Limit[((-1+(-1+x) PolyLog[x,1])/(-1+x)),x->1,Direction->1]

Limit[Product[1/(1-1/Prime[k]),{k,PrimePi[n]}]/Log[n],n->∞]

{With[{n=10^6},Product[1/(1.-1/Prime[k]),{k,PrimePi[n]}]/Log[n]],Exp[EulerGamma]}//N//Timing

{With[{n=10^6},Product[1.+1/Prime[k],{k,PrimePi[n]}]/Log[n]],6E^EulerGamma/Pi^2}//N//Timing

Sums

MangoldtLambda[1]:=0
MangoldtLambda[n_Integer?Positive]:=Module[{f=FactorInteger[n]},
If[Length[f]==1,Log[f[[1,1]]],0]
]

v5

{Sum[((MangoldtLambda[k]-1.)/k),{k,10^5}],-2.EulerGamma}//Timing

Sum[((Zeta[k]-1)/k),{k,2,∞}]

{NSum[((Zeta[k]-1)/k),{k,2,∞}],1-EulerGamma}//N

With[{n=5 10^5},(1/n)Sum[Ceiling[(n/k)]-(n/k)//N,{k,n-1}]]//Timing

EulerGamma//N

v6

{Sum[((MangoldtLambda[k]-1.)/k),{k,10^5}],-2.EulerGamma}//Timing

Sum[((Zeta[k]-1)/k),{k,2,∞}]

{NSum[((Zeta[k]-1)/k),{k,2,∞}],1-EulerGamma}//N

Inequalities

<<Graphics`Colors`
<<Utilities`Typesetting`

colors={Red,Black,Blue};
fn={
{(1/(2(n+1))),HarmonicNumber[n]-Log[n]-EulerGamma,(1/(2n))},
{(1/(24(((n+1))^2))),HarmonicNumber[n]-Log[n+(1/2)]-EulerGamma,(1/(24(n^2)))}
};
Show[GraphicsArray[
Block[{$DisplayFunction=Identity},
Plot[#,{n,1,10},PlotStyle->colors,AxesLabel->TraditionalForm/@{n,StyleForm[#1,FontColor->#2]&@@@Transpose[{#,colors}]}]
]&/@fn],
GraphicsSpacing->-.02
]

Resolve[ForAll[n,
n>1,
Less@@#
]]&/@fn

Integrals

(∫_0^∞)(e^(-x)) (lnx)dx

-Integrate[Exp[-x]Log[x],{x,0,Infinity}]

(∫_0^∞)((1/(1-(e^(-x))))-(1/x)) (e^(-x))dx

Integrate[(1/(1-Exp[-x])-1/x)Exp[-x],{x,0,Infinity}]

Integrate[1/x(1/(1+x)-Exp[-x]),{x,0,Infinity}]

(∫_0^1)(∫_0^1)((x-1)/((1-x y) log(x y)))dydx

Sondow 2005

Integrate[((x-1)/((1-x y)(Log[x]+Log[ y]))),{x,0,1},{y,0,1}]

v5.0

Integrate[((x-1)/((1-x y)Log[x y])),{x,0,1},{y,0,1}]

Integrate[((x-1)/((1-x y)(Log[x]+Log[y]))),{x,0,1},{y,0,1}]

Numerical

NIntegrate[((x-1)/((1-x y)Log[x y])),{x,0,1},{y,0,1},WorkingPrecision->20]//Timing

Timing[NIntegrate[(x - 1)/((1 - x*y)*Log[x*y]), {x, 0, 1}, {y, 0, 1}, WorkingPrecision -> 25, Method -> GaussKronrod]]

N[EulerGamma,20]

(∫_0^1)(∫_0^1)((x-1)/((1+x y) log(x y)))dydx

Sondow

Integrate[((x-1)/((1+x y)(Log[x]+Log[y]))),{x,0,1},{y,0,1}]//Timing

Integrate[((x-1)/((1+x y)(Log[x]+Log[y]))),{x,0,1}]

Integrate[((x-1)/((1+x y)(Log[x]+Log[y]))),{y,0,1}]

N[Log[4/Pi]]

NIntegrate[((x-1)/((1+x y)(Log[x]+Log[y]))),{x,0,1},{y,0,1}]//Timing

Series

1+(∑_(k=2)^∞)(log(((k-1)/k))+(1/k))

V6

1+Sum[1/k+Log[(k-1)/k],{k,2,∞}]//Timing

V7

1+Sum[1/k+Log[(k-1)/k],{k,2,∞}]//Timing

(∑_(k=1)^∞)((1/k)-log(1+(1/k)))

V6

Sum[1/k-Log[1+1/k],{k,∞}]//Timing

V7

Sum[1/k-Log[1+1/k],{k,∞}]//Timing

(∑_(k=1)^∞)(((-1))^(k-1)) ((1/k)-log(1+(1/k)))

V6

FullSimplify[Sum[(((-1))^(k-1))(1/k-Log[1+1/k]),{k,∞}]]//Timing

V7

FullSimplify[Sum[(((-1))^(k-1))(1/k-Log[1+1/k]),{k,∞}]]//Timing

(∑_(n=2)^∞)(((((-1))^n) ζ(n))/n)

V6

Sum[(-1)^n Zeta[n]/n,{n,2,∞}]//Timing

V7

Sum[(-1)^n Zeta[n]/n,{n,2,∞}]//Timing

log((4/π))-(∑_(n=1)^∞)(((((-1))^n) ζ(n+1))/((2^n) (n+1)))

V6

Log[4/Pi]-Sum[(-1)^n Zeta[n+1]/2^n/(n+1),{n,∞}]//Timing

FullSimplify[Last[%]]

V7

Log[4/Pi]-Sum[(-1)^n Zeta[n+1]/2^n/(n+1),{n,∞}]//Timing

(∑_n^∞)(((((-1))^n) ⌊(Subscript[log, 2])(n)⌋)/n)

V6

Sum[(((-1))^n)((Floor[Log[2,n]])/n),{n,∞}]

V7

Sum[(((-1))^n)((Floor[Log[2,n]])/n),{n,∞}]//InputForm

NSum[(((-1))^n)((Floor[Log[2,n]])/n),{n,∞}]

Sum[(((-1))^n)((Floor[Log[2,n]])/n),{n,10^4}]//N

-(∑_(m=2)^∞)((((((-1))^m) (m-1) )/m)(ζ(m)-1))-ln(2)+(3/2)

V6

(3/2)-Log[2]-Sum[(((-1))^m)((m-1)/m)(Zeta[m]-1),{m,2,∞}]//Simplify

V7

(3/2)-Log[2]-Sum[(((-1))^m)((m-1)/m)(Zeta[m]-1),{m,2,∞}]//Simplify

(∑_k^∞)(((((-1))^k) (BernoulliB2[1, (Subscript[log, 2])(k)]))/k)==ℽ

BernoulliB[1,Log[2,k]]

Sum[(-1)^k/k BernoulliB[1,Log[2,k]],{k,a}]

Sum[(-1)^k/k BernoulliB[1,Log[2,k]],{k,∞}]

Double sums

(∑_(n=1)^∞)(∑_(k=(2^n))^∞)((((-1))^k)/k)

v4.2

Sum[(-1)^k/k,{k,2^n,∞}]

FullSimplify[%]

Sum[(1/2) (((-1))^(2^n)) (-PolyGamma[0,(2^(-1+n))]+PolyGamma[0,(1/2) (1+(2^n))]),{n,∞}]

NSum[(-1)^k/k,{n,∞},{k,2^n,∞}]

V5

Sum[(-1)^k/k,{k,2^n,∞}]

FullSimplify[%]

Wrong

Sum[(-1)^k/k,{n,∞},{k,2^n,∞}]

NSum[(-1)^k/k,{k,2^n,∞}]

NSum[(-1)^k/k,{n,∞},{k,2^n,∞}]

NSum[(1/2) (((-1))^(2^n)) (-PolyGamma[0,(2^(-1+n))]+PolyGamma[0,(1/2) (1+(2^n))]),{n,∞},Method->Fit]

NSum[(-1)^k/k,{n,∞},{k,2^n,∞},Method->Fit]

V6

Sum[(-1)^k/k,{n,∞},{k,2^n,∞}]//Timing

V7

Sum[(-1)^k/k,{n,∞},{k,2^n,∞}]//Timing

1-(∑_(n=1)^∞)(∑_(k=(2^(n-1)))^((2^n)-1))(n/((2 k+1) (2 k+2)))

V5

1-Sum[(n/((2k+1)(2k+2))),{n,∞},{k,(2^(n-1)),(2^n)-1}]

...wrong...

Sum[(n/((2k+1)(2k+2))),{k,(2^(n-1)),(2^n)-1}]

Sum[%,{n,∞}]

...wrong...

1-NSum[(n/((2k+1)(2k+2))),{n,∞},{k,(2^(n-1)),(2^n)-1}]

V6

1-Sum[(n/((2k+1)(2k+2))),{n,∞},{k,(2^(n-1)),(2^n)-1}]//Timing

V7

1-Sum[(n/((2k+1)(2k+2))),{n,∞},{k,(2^(n-1)),(2^n)-1}]//Timing

(∑_(k=1)^∞)(∑_(j=0)^(k-1))(1/((2^(k+1)) (({{j+(2^(k-j))}, {j}}))))

v4.2

Sum[(1/(2^(k+1)))1/Binomial[(2^(k-j))+j,j],{k,∞},{j,0,k-1}]

Sum[1/Binomial[(2^(k-j))+j,j],{j,0,k-1}]

v5.0

Sum[(1/(2^(k+1)))1/Binomial[(2^(k-j))+j,j],{k,∞},{j,0,k-1}]

Sum[1/Binomial[(2^(k-j))+j,j],{j,0,k-1}]

Sum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j],{k,34},{j,0,k-1}]

N[%,10]

V7

Sum[(1/(2^(k+1)))1/Binomial[(2^(k-j))+j,j],{k,∞},{j,0,k-1}]//InputForm

Numerical

NSum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j],{k,∞},{j,0,k-1}]

N[Sum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j],{k,30},{j,0,k-1}],10]

Sum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j],{k,34},{j,0,k-1}]

N[%,10]

These hang

NSum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j],{k,∞},{j,0,k-1},WorkingPrecision->20]//Timing

NSum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j],{k,∞},{j,0,k-1},WorkingPrecision->20]//Timing

Timing[NSum[1/2^(k + 1)/Binomial[2^(k - j) + j, j], {k, Infinity}, 
   {j, 0, k - 1}]]

Timing[NSum[1/2^(k + 1)/Binomial[2^(k - j) + j, j], {k, Infinity}, 
   {j, k - 1}]]

Timing[NSum[1/2^(k + 1)/Binomial[2^(k - j) + j, j], {k, 2, Infinity}, 
   {j, k - 1}]]

Sum[(1/(2^(k+1)))/Binomial[(2^(k-j))+j,j]/.j->0,{k,∞}]

1/2+0.07721566490153307`-EulerGamma

Products

Related to Barnes' G-Function

Product[Exp[-1+1/(2n)](1+1/n)^n,{n,∞}]

Product[Exp[-2+2/n](1+2/n)^n,{n,∞}]

Sondow

V6

Sum[(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{k,0,n-1}]

Exp@Table[Sum[(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{k,0,n-1}],{n,5}]

Block[{$MaxExtraPrecision=10^3},Exp[N[Sum[(1/n)(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{n,300},{k,0,n-1}],20]]
]//Timing

Exp[EulerGamma]//N

V7

Sum[(1/n)(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{k,0,n-1}]

Sum[(1/n)(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{n,∞},{k,0,n-1}]//InputForm

NSum[(1/n)(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{n,20},{k,0,n-1}]

NSum[(1/n)(((-1))^(k+1))Binomial[n-1,k]Log[k+1],{n,25},{k,0,n-1}]

Limits

(lim_(m->∞)) ((∑_(n=1)^m)(1/n)-log(m))

-Log[m]+Sum[1/n,{n,m}]

Limit[%,m->∞]

-Γ'(1)

-Gamma'[1]

(lim_(s->1)) (ζ(s)-(1/(s-1)))

v4.2

Limit[Zeta[s]-1/(s-1),s->1]

FullSimplify[Sum[1/n^s-1/s^n,{n,Infinity}]]

Sum[1/n^s-1/s^n,{n,Infinity}]

Limit[(1/(1-s))+Zeta[s],s->1,Direction->1]

v5.0

Sum[1/n^s-1/s^n,{n,Infinity}]

FullSimplify[Sum[1/n^s-1/s^n,{n,Infinity}]]

Limit[ Sum[1/n^s-1/s^n,{n,Infinity}],s->1,Direction->1]

v6

Sum[1/n^s-1/s^n,{n,Infinity}]

FullSimplify[Sum[1/n^s-1/s^n,{n,Infinity}]]

Limit[%,s->1,Direction->1]

Limit[(1/(1-s))+Zeta[s],s->1,Direction->1]

(lim_(x->∞)) (x-Γ((1/x)))

Limit[x-Gamma[1/x],x->∞]

(lim_(n->∞))(((2 n-1)/(2 n))-log(n)+(∑_(k=2)^n)((1/k)-((ζ(1-k))/(n^k))))

N[Table[(2n-1)/(2n)-Log[n]+Sum[1/k-Zeta[1-k]/n^k,{k,2,n}],{n,10}],20]

N[Table[(2n-1)/(2n)-Log[n]+Sum[1/k(1+BernoulliB[k]/n^k),{k,2,n}],{n,10}],20]

-(lim_(n->∞)) (((Γ((1/n)) Γ(n+1) (n^(1+(1/n))))/(Γ(n+2+(1/n))))-((n^2)/(n+1)))

v5

Limit[Gamma[1/n]Gamma[n+1]n^(1/n+1)/Gamma[2+1/n+n]-n^2/(n+1),n->∞]

Limit[FullSimplify[Gamma[1/n]Gamma[n+1]n^(1/n+1)/Gamma[2+1/n+n]-n^2/(n+1),n>0],n->∞]

Gamma[1/n]Gamma[n+1]n^(1/n+1)/Gamma[2+1/n+n]-n^2/(n+1)/.n->10^5.

v6

Limit[Gamma[1/n]Gamma[n+1]n^(1/n+1)/Gamma[2+1/n+n]-n^2/(n+1),n->∞]

Limit[FullSimplify[Gamma[1/n]Gamma[n+1]n^(1/n+1)/Gamma[2+1/n+n]-n^2/(n+1),n>0],n->∞]

(lim_(n->∞))(1/n) (∑_(k=1)^(n-1))(⌈(n/k)⌉-(n/k))

V5

Limit[(1/n)Sum[Ceiling[(n/k)]-(n/k),{k,n-1}],n->∞]

With[{n=10^5},(1/n)Sum[Ceiling[(n/k)]-(n/k),{k,n-1}]]//N

With[{n=10^5},(1/n)Sum[Ceiling[(n/k)]-(n/k),{k,n+1}]]//N

V7

$Version

(1/n)Sum[Ceiling[(n/k)]-(n/k),{k,n-1}]//InputForm

Fractional parts

Figure

With[{h=.015,dy=.08,dx=.02,c=EulerGamma},Graphics[
Table[With[{y=-n dy,frac=FractionalPart[c Range[n]]},{
Text[n,{-dx,y},{1,0}],
Text[N@Last@frac,{1+dx,y},{-1,0}],
AbsolutePointSize[6],Point[{#,y}&/@frac],
Line[{{0,y},{1,y}}],
Line[{{#,y+h},{#,y-h}}]&/@Subdivide[0,1,n]
}],{n,10}]]]

Counts of fractional parts in equidistributed bins

A194337

(rows=Table[BinCounts[FractionalPart[EulerGamma Range[n]],{0,1,1/n}],{n,20}])//Column

Numbers of empty intervals

A046157

Count[#,0]&/@rows

Table[Count[BinCounts[FractionalPart[EulerGamma Range[n]],{0,1,1/n}],0],{n,95}]

Values of n  for which no bins are left blank

A046158

Position[rows,{1..}]//Flatten

BFileSequence[46158]

Position[Table[Count[BinCounts[FractionalPart[EulerGamma Range[n]],{0,1,1/n}],0],{n,1000}],0]//Flatten//Timing

See also NumberTheory/EquidistributedSequence.nb

<<MathWorld`IntegerSequences`

AbsoluteTiming[Sequence@@Timing[EquidistributedSubdivisions[EulerGamma,5*^5]]]

AbsoluteTiming[Sequence@@Timing[EquidistributedSubdivisions[EulerGamma,1*^6]]]

AbsoluteTiming[Sequence@@Timing[EquidistributedSubdivisions[EulerGamma,1*^7]]]

Non-convergent denominator terms

terms=BFileSequence[46158]

A046115

denom=Denominator[Convergents[EulerGamma,20]]

Intersection[denom,terms]

Complement[terms,denom]

BBP-type formulas

Search

<<Utilities`Simplify`

Monitor[Do[If[(b=FindBasis[EulerGamma,-6^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{-6^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-5^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{-5^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{-3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{-3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{-3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{-2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{-2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{-2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,1}],{-1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,2,2}],{-1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,-1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,3,3}],{-1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,2,2}],{1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,3,3}],{1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[EulerGamma,3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{3^k,n,p}];//Timing

Zeta series

Series[Zeta[s],{s,1,4}]

γ-related integrals

i[n_]:=i[n]=(-1)^n Integrate[(Log[z])^n Exp[-z],{z,0,Infinity}];
mu[n_]:=mu[n]=Sum[Binomial[n,k] a^(n-k) b^k i[k],{k,0,n}];

Table[i[n],{n,0,4}]//TableForm

Table[mu[n],{n,0,4}]//TableForm

s2=Simplify[mu[2]-mu[1]^2]

g1=Simplify[mu[3]/s2^(3/2)]

g2=Simplify[mu[4]/s2^2-3]

Brent and MacMillan identity

Sum[((((z/2))^(2k+ν))/(k! Gamma[k+ν+1])),{k,0,∞}]

FullSimplify[Sum[HarmonicNumber[k]((((z/2))^(2k))/(((k!))^2)),{k,0,∞}]]

<<Graphics`Colors`

Plot[(1/(BesselI[0,z]))(EulerGamma BesselI[0,z]-Derivative[1,0][Hypergeometric0F1Regularized][1,((z^2)/4)]-BesselK[0,z])-(EulerGamma+Log[z/2]),{z,.001,2},PlotStyle->Red]

Limit Form

v4.2.1

expr=FullSimplify[((Sum[HarmonicNumber[k]*(n^(2*k)/k!^2),{k,0,Infinity}])/(Sum[(n^k/k!)^2,{k,0,Infinity}]))-Log[n]]

Simplify[expr,n>0]

Limit[EulerGamma+((BesselK[0,2 n])/(BesselI[0,2 n])),n->∞]

v5.0.1

expr=FullSimplify[((Sum[HarmonicNumber[k]*(n^(2*k)/k!^2),{k,0,Infinity}])/(Sum[(n^k/k!)^2,{k,0,Infinity}]))-Log[n]]

expr/.n->999.

Limit[expr,n->∞]

Limit[EulerGamma+((BesselK[0,2 n])/(BesselI[0,2 n])),n->∞]

v5.1

expr=FullSimplify[((Sum[HarmonicNumber[k]*(n^(2*k)/k!^2),{k,0,Infinity}])/(Sum[(n^k/k!)^2,{k,0,Infinity}]))-Log[n]]

expr/.n->999.

Limit[expr,n->∞]//Timing

Iterator

A[0]:=-Log[n]
B[0]:=1
U[0]:=A[0]
V[1]:=1
B[k_]:=B[k-1]n^2/k^2
A[k_]:=(1/k)(((A[k-1]n^2)/k)+B[k])
U[k_]:=U[k-1]+A[k]
V[k_]:=V[k-1]+B[k]

N[With[{m=40},U[m]/V[m]]/.n->10,100]

N[EulerGamma,100]