Barnes' G-Function

Author

Eric W. Weisstein
February 21, 2024

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/BarnesG-Function.nb.

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

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

Values at integers

Product[i!,{i,n-2}]

Table[{Product[i!,{i,n-2}],BarnesG[n]},{n,-3,5}]

Table[Piecewise[{{0,n<1}},Product[i!,{i,n-2}]],{n,0,10}]

Table[BarnesG[n],{n,0,10}]

Plots

<<Utilities`Plot`

Real Line

Plot[BarnesG[n],{n,0,5},AxesLabel->{x,BarnesG[x]},ImageSize->300]

Complex Plane

Re/Im Plot

ComplexPlot3D[BarnesG[z],{z,-.01-3I,6+3I}]

ComplexPlot3D[BarnesG[z],{z,-.01-3I,6+3I},"PolygonReduction"->.3]

Contour Plot

ComplexContourPlot[BarnesG[z],{z,.001-3I,6+3I}]

ComplexContourPlot[BarnesG[z],{z,.001-3I,6+3I},Contours->8,"MeshRegions"->False,"PackGraphicsComplex"->True]

Special Values

<<Utilities`Typesetting`

G(1/4)

BarnesG[1/4]//FunctionExpand

Actual:

{NBarnesG[#],N[BarnesG[#],20]}&[1/4]

G(1/2)

BarnesG[1/2]//TraditionalForm

FullSimplify[1/Pi^(1/4)Exp[1/24 Log[ 2]+3/2Zeta'[-1]]]//TraditionalForm

G(3/4)

BarnesG[3/4]//FunctionExpand//TraditionalForm

Should be:

{BarnesG[(3/4)],((Exp[(3/32)+(Catalan/(4π))])/((Glaisher^(9/8))((Gamma[(3/4)])^(1/4)))),((((Gamma[(1/4)])^(1/4))Exp[(3/32)+(Catalan/(4π))])/((Glaisher^(9/8))(2^(1/8))(Pi^(1/4))))}//N

G(1)

BarnesG[1]

G(3/2)

BarnesG[3/2]//TraditionalForm

G(5/2)

BarnesG[5/2]//TraditionalForm

(BarnesG[k-(1/2)])==(((e^(1/8)) (2^(1/24)) (A^(-3/2)) (π^((1/4) (2 k-3))) )/(2^((1/2) (k-1) (k-2))))(∏_(i=1)^(k-2))(((2^i) (Gamma[i+(1/2)]))/(Sqrt[π]))

Product[2^i*Gamma[i+1/2]/Sqrt[Pi],{i,1,k-2}]//FullSimplify

Simplify[Glaisher^(-3/2)*Pi^((2 k-3)/4)*E^(1/8)*2^(1/24)/2^((k-1)*(k-2)/2)*Product[2^i*Gamma[i+1/2]/Sqrt[Pi],{i,1,k-2}]]

FullSimplify[Table[BarnesG[n/2]A^(3/2),{n,1,7,2}]]//TraditionalForm

FullSimplify[Table[G[n/2]A^(3/2)/2^(1/24)/Exp[1/8]/Pi^((n-2)/4),{n,1,15,2}]]

get the denominator

Table[2^((n-1)(n-2)/2),{n,10}]

Expand out the rest

FullSimplify[Table[G[(2k-1)/2]A^(3/2)/2^(1/24)/Exp[1/8]/Pi^((2k-3)/4) 2^((k-1)(k-2)/2),{k,10}]]//Timing

Closed form

Table[ Product[2^i Gamma[1/2+i]/Sqrt[Pi],{i,n-2}],{n,11}]

Table[If[n==1,1,Product[2^i Gamma[1/2+i],{i,n-2}]/Pi^((n-2)/2)],{n,11}]

Product[2^i Gamma[1/2+i],{i,n-2}]/Pi^((n-2)/2)

Product[2^i Gamma[1/2+i],{i,k-2}]/Pi^((k-2)/2)/(a^(3/2)/2^(1/24)/Exp[1/8]/Pi^((2k-1)/4) 2^(k(k-1)/2))

FullSimplify[Table[Product[2^i Gamma[1/2+i],{i,k-2}]/Pi^((2k-3)/2)/(A^(3/2)/2^(1/24)/Exp[1/8]/Pi^((2k-1)/4) 2^((k-1)(k-2)/2)),{k,4}]]

FullSimplify[Table[G[(2k-1)/2],{k,4}]]

Built-In

V6.1

Table[BarnesG[n],{n,6}]

Via PolyGamma

FunctionExpand[BarnesG[z]]

BarnesGPolyGamma[z_]:=(2Pi)^(z/2)*Exp[(z-1)*(LogGamma[z]-z/2)-PolyGamma[-2,z]]

BarnesGPolyGamma[z]//TraditionalForm

Table[BarnesGPolyGamma[n],{n,6}]//FullSimplify

V7

BarnesGPolyGamma[z]//FullSimplify

Table[(E^((-1+z) (-(z/2)+LogGamma[z])-PolyGamma[-2,z])) (((2 π))^(z/2))-BarnesG[z]/.z->RandomComplex[],{1000}]//Chop//Union

In terms of Hyperfactorial

V6

G[n0_]:=With[{n=n0+1},Gamma[n]^(n-1)/K[n]]

FullSimplify[KFunction/@Range[5]]

Product[k^k,{k,n}]

0^0

Product[k^k,{k,0,0}]

Product[k^k,{k,0,1}]

Product[k^k,{k,0,n}]//InputForm

%/.n->0

N[%]

V7

FullSimplify[Gamma[n]^(n-1)/Hyperfactorial[n-1],n∈Integers&&n>0]

Subtract@@@Table[{(((Gamma[n])^(-1+n))/(Hyperfactorial[n-1])),BarnesG[n]},{n,10}]

Subtract@@@Table[(((Gamma[n])^(-1+n))/(Hyperfactorial[n-1]))-BarnesG[n]/.n->RandomComplex[],{100}]//Chop//Union

Direct Product

V6

Table[Product[k!,{k,0,n-1}],{n,6}]

V7

Product[k!,{k,0,n-2}]

Other Methods

Table[NBarnesG[n],{n,5}]//N//Timing

Table[NBarnesG2[n],{n,5}]//N//Timing

Table[BarnesG2[n],{n,5}]//N//Timing

Products

(∏_k^(n-2))k!==G(n)

V6

Product[k!,{k,n-2}]

Table[Product[k!,{k,n-2}],{n,5}]

V7

Product[k!,{k,n-2}]

(((2 π))^((z-1)/2)) exp(-(1/2) (ℽ (((z-1))^2)+z (z-1))) (∏_n^∞)(((((z-1)/n)+1))^n) exp(((((z-1))^2)/(2 n))-z+1)==G(z)

V6

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

Table[(((E^((1/12)-Derivative[1,0][Zeta][-1,z])) ((Gamma[z])^(-1+z)))/Glaisher),{z,6}]//FullSimplify

FullSimplify[(E^(1/12 - Derivative[1, 0][Zeta][-1, z])*Gamma[z]^(-1 + z))/Glaisher]//InputForm

Union[Chop[Table[(E^(1/12 - Derivative[1, 0][Zeta][-1, z])*Gamma[z]^(-1 + z))/Glaisher - 
      BarnesG[z] /. z -> RandomComplex[], {100}]]]

V7

G2[z]

FullSimplify[%]

V7

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

FullSimplify[%]

Sum

exp((∑_(n=3)^∞)(((((-1))^(n-1)) (z^n) ζ(n-1))/n)+(1/2) (ln(2 π)-1) z-(1/2) (1+ℽ) (z^2))==G(n)

V6

Exp[(1/2)(Log[2π]-1)z-(1+EulerGamma)((z^2)/2)+Sum[(((-1))^(n-1))Zeta[n-1]((z^n)/n),{n,3,∞}]/.z->z-1]//FullSimplify

FunctionExpand[%89]

Table[(((E^((1/12)-(1/2) EulerGamma (1+z (-3+2 z))-EulerGamma (-1+z) Zeta[0,z]-Derivative[1,0][Zeta][-1,z])) ((Gamma[z])^(-1+z)))/Glaisher),{z,5}]//FullSimplify

V7

Exp[(1/2)(Log[2π]-1)z-(1+EulerGamma)((z^2)/2)+Sum[(((-1))^(n-1))Zeta[n-1]((z^n)/n),{n,3,∞}]]

FullSimplify[%]

Generating function

(∑_(n=0)^∞)((G(n) (x^n))/n)

Sum[BarnesG[n]((x^n)/n),{n,0,∞}]//InputForm

Sum[BarnesG[n](x^n),{n,0,10}]

(∑_(n=0)^∞)((G(n) (x^n))/(n!))

Sum[BarnesG[n]((x^n)/(n!)),{n,0,∞}]

Sum[BarnesG[n]((x^n)/(n!)),{n,0,10}]

(∑_(n=0)^∞)((G(n) (x^n))/(H(n)))

Sum[BarnesG[n]((x^n)/(Hyperfactorial[n])),{n,0,∞}]

Sum[BarnesG[n]((x^n)/(Hyperfactorial[n])),{n,0,10}]

Denominator[CoefficientList[%,x]]

Sum[BarnesG[n]((x^n)/(Hyperfactorial[n-2])),{n,0,10}]

Denominator[CoefficientList[%,x]]

Product[(k^(2k-1-n)),{k,n}]//InputForm

Table[E^(-1/6+2*Derivative[1,0][Zeta][-1,1+n])*Glaisher^2*Gamma[1+n]^(-1-n),{n,0,10}]//FullSimplify

Table[((Hyperfactorial[n])^2)((Gamma[1+n])^(-(n+1))),{n,0,10}]

Table[Product[Binomial[n,k],{k,0,n}],{n,0,10}]

TraditionalForm[%]

Table[%,{n,0,5}]//FullSimplify

Product[Binomial[n,k],{k,0,n}]

Table[%,{n,0,3}]

Derivative and Integral

Derivative

BarnesG'[z]

FullSimplify[BarnesG'[z]]//TraditionalForm

Integrate[D[BarnesG[z],z],z]

Integral

Integrate[BarnesG[z],z]

Identities

((((Γ(z))^(z-1)) (e^((1/12)-Derivative[1,0][ζ](-1,z))))/A)==G(z)/;Re[z]>0

expr=(((E^((1/12)-Derivative[1,0][Zeta][-1,z])) ((Gamma[z])^(-1+z)))/Glaisher);

Table[expr,{z,6}]//FullSimplify

FullSimplify[expr]

FullSimplify[expr,z>0]

Subtract@@@Table[{expr,BarnesG[z]} /. z -> RandomComplex[{-I,I+1}], {100}]//Chop//Union

(E^(1/12 - Derivative[1, 0][Zeta][-1, z])*Gamma[z]^(-1 + z))/Glaisher - 
      BarnesG[z]/.z->x+I y

Plot3D[Abs[-BarnesG[x+I y]+(((E^((1/12)-Derivative[1,0][Zeta][-1,x+I y])) ((Gamma[x+I y])^(-1+x+I y)))/Glaisher)],{x,-1,1},{y,-1,1},PlotPoints->10]

Reflection Formula

FullSimplify[((Derivative[1][BarnesG][z+1])/(BarnesG[z+1]))]

G(n)==(((Γ(n))^(n-1))/(H(n-1)))/;Γ(n)>0

FullSimplify[Gamma[n]^(n-1)/Hyperfactorial[n-1],n>0]

FullSimplify[(((Gamma[n])^(-1+n))/(Hyperfactorial[-1+n]))-BarnesG[n],n>0]

FunctionExpand[%]

Plot[-BarnesG[n]+(((Gamma[n])^(-1+n))/(Hyperfactorial[-1+n])),{n,0,4}]

Table[Hyperfactorial[n-1]*BarnesG[n]-Exp[(n-1)*LogGamma[n]]/.n->RandomComplexDisk[],{100}]//Chop//Union

G(n) H(n-1)==exp((n-1) logΓ(n))

FullSimplify[Hyperfactorial[n-1]*BarnesG[n]-Exp[(n-1)*LogGamma[n]]]

Table[Hyperfactorial[n-1]*BarnesG[n]-Exp[(n-1)*LogGamma[n]]/.n->RandomComplexDisk[],{100}]//Chop//Union

Table[Hyperfactorial[n-1]*BarnesG[n]-Exp[(n-1)*Log[Gamma[n]]]/.n->RandomComplexDisk[],{100}]//Chop//Union

Table[Hyperfactorial[n-1]*BarnesG[n]-Exp[(n-1)*Log[Gamma[n]]]/.n->RandomComplexDisk[],{100}]//Chop//Union

Recurrence Relation

G[1]==1
G[z+1]==Gamma[z]G[z]

V6

RSolve[{g[r]==Gamma[r-1]g[r-1],g[1]==1},g[r],r]

FullSimplify[Table[{BarnesG[n+1],BarnesG[n]Gamma[n]},{n,5}]]

V7

RSolve[{g[r]==Gamma[r-1]g[r-1],g[1]==1},g[r],r]

Glaisher

A=Exp[1/12-Zeta'[-1]]

{A,Glaisher}//N

ListPlot[Table[Exp[Log[Product[k^k,{k,n}]]-(n^2/2+n/2+1/12)Log[n]+n^2/4],{n,1,30}],Joined->True,Epilog->{RGBColor[1,0,0],Line[{{0,Glaisher},{200,Glaisher}}]},AxesOrigin->{1,1.282},PlotRange->{Automatic,{1.282,1.284}}]

FullSimplify[Exp[-Zeta'[2]/(2Pi^2)+(Log[2Pi]+EulerGamma)/12]]

N[Glaisher-%,20]

V6

Limit[Log[Product[k^k,{k,n}]]-(n^2/2+n/2+1/12)Log[n]+n^2/4,n->∞]

V7

Log[Product[k^k,{k,n}]]-(n^2/2+n/2+1/12)Log[n]+n^2/4

Limit[Log[Product[k^k,{k,n}]]-(n^2/2+n/2+1/12)Log[n]+n^2/4,n->∞]

Expansion

V6

BarnesG[x]//FunctionExpand

V7

BarnesG[x]//FunctionExpand

Series

Asymptotic Series

Series[BarnesG[z],{z,∞,3}]

TimeConstrained[FullSimplify[%,z>0],60]//Timing

$Version

s[z0_,n_:0]:=Module[{z=z0-1,k},
z^2(Log[z]/2-3/4)+z/2 Log[2Pi]-Log[z]/12+Zeta'[1]-Sum[((BernoulliB[2k+2])/(4k(k+1)(z^(2k)))),{k,n}]
]

N[s[1002/10],20]

N[s[1002/10,3],20]

Log[BarnesG[1002/10]]

N[Log[BarnesG2[1002/10]],20]

Taylor Series

G3[z0_]:=Module[{z=z0-1,n},
Exp[(Log[2Pi]-1)z/2-(1+EulerGamma)z^2/2+Sum[(-1)^(n-1)Zeta[n-1]z^n/n,{n,3,Infinity}]]
]

G3[1/2]

FullSimplify[%]

FullSimplify[G[1/2]]

Limits

Limits for G(n)

Plot[G[n]/(n^(n^2/2-1/12)(2Pi)^(n/2)Exp[-3n^2/4])/(Exp[1/12]/Glaisher),{n,1,5000}]

N[Exp[1/12]/Glaisher,20]

G[n]/(n^(n^2/2-1/12)(2Pi)^(n/2)Exp[-3n^2/4])/.n->300.

G[n]/(n^(n^2/2-1/12)(2Pi)^(n/2)Exp[-3n^2/4])/.n->1000.

Limit[G[n]/(n^(n^2/2-1/12)(2Pi)^(n/2)Exp[-3n^2/4]),n->Infinity]

Oleg's Incorrect Limit

Limit[Exp[1/12-n^2/4] n^(1/12+n/2+n^2/2)n!^(-n)G[n+1],n->Infinity]

Exp[1/12-n^2/4 ]n^(1/12+n/2+n^2/2)n!^(-n)G[n+1]/.n->100.

Limits for K(n)

Plot[K[n+1]/(n^(n^2/2+n/2+1/12)Exp[-n^2/4])/Glaisher,{n,1,5000}]

N[Glaisher]

FullSimplify[2^(7/36)Pi^(-1/6)Exp[1/3+2/3 Integrate[Log[Gamma[x+1]],{x,0,1/2}]]]

2^(7/36)Pi^(-1/6)Exp[1/3+2/3 NIntegrate[Log[Gamma[x+1]],{x,0,1/2}]]

Glaisher//N

K[n+1]/n^(n^2/2+n/2+1/12)/Exp[-n^2/4]/.n->300.

Limit[FullSimplify[K[n+1]/n^(n^2/2+n/2+1/12)/Exp[-n^2/4]],n->Infinity]