({{, (RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction])[expr,n,x] 
gives the exponential generating function in x for the sequence whose n(^th) term is given by the expression expr.}, {, (RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction])[expr,{(Subscript[n, 1]),(Subscript[n, 2]),…},{(Subscript[x, 1]),(Subscript[x, 2]),…}]
gives the multidimensional exponential generating function in (Subscript[x, 1]), (Subscript[x, 2]), … whose (Subscript[n, 1]), (Subscript[n, 2]), … term is given by expr.}})

OpenersNotesSection(Spacer1)Details and Options

The exponential generating function for a sequence whose n(^th) term is (Subscript[a, n]) is given by (∑_(n=0)^∞)(Subscript[a, n]) (x^n)/n!.

The multidimensional exponential generating function is given by (∑_((Subscript[n, 1])=0)^∞)(∑_((Subscript[n, 2])=0)^∞)⋯ (Subscript[a, (Subscript[n, 1])(Subscript[n, 2])])⋯ (Subscript[x, 1]^(Subscript[n, 1]))/(Subscript[n, 1])! (Subscript[x, 2]^(Subscript[n, 2]))/(Subscript[n, 2])! ⋯ .

The following options can be given:

OpenersPrimaryExamplesSection(Spacer1)Examples  (31)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

The exponential generating function for the sequence whose n(^th) term is 1:

ExponentialGeneratingFunction[1,n,x]

The n(^th) term in the series is 1/n!:

Series[%,{x,0,10}]

OpenersExampleSection1(Spacer1)Scope  (19)

OpenersExampleSubsection0(Spacer1)Basic Uses  (6)

Exponential generating function of a univariate sequence:

ExponentialGeneratingFunction[a^n,n,z]

Exponential generating function of a multivariate sequence:

ExponentialGeneratingFunction[a^(n+m),{n,m},{z,w}]

Compute a typical exponential generating function:

F=ExponentialGeneratingFunction[n (n+1)(-1/2)^n,n,z]

Plot the magnitude using (RefLink[Plot3D, paclet:ref/Plot3D]), (RefLink[ContourPlot, paclet:ref/ContourPlot]) or (RefLink[DensityPlot, paclet:ref/DensityPlot]):

Block[{z=u+I v},Table[plot[Abs[F],{u,-2,2},{v,-2,2}],{plot,{Plot3D,ContourPlot,DensityPlot}}]]

Plot the complex phase:

Block[{z=u+I v},Table[plot[Arg[F],{u,-2,2},{v,-2,2}],{plot,{Plot3D,ContourPlot,DensityPlot}}]]

Generate conditions for the region of convergence:

ExponentialGeneratingFunction[a*n!,n,z,GenerateConditions->True]

Plot the region for a==(1/2):

With[{z=u+I v},RegionPlot[Abs[z]<1,{u,-2,2},{v,-2,2}]]

Evaluate the exponential generating function at a point:

F=ExponentialGeneratingFunction[Sin[n 2Pi/3](2/3)^n,n,Exp[I ω]]

Plot the spectrum:

LogPlot[Abs[F]^2,{ω,0,2π},Ticks->{{0,π,2π},Automatic}]

The phase:

Plot[Arg[F],{ω,0,2π},Ticks->{{0,π,2π},Automatic}]

Plot both the spectrum and the plot phase using color:

LogPlot[Abs[F]^2,{ω,0,2π},Ticks->{{0,π,2π},Automatic},ColorFunction->Function[ω,Evaluate@Hue[Arg[F]/(2Pi)+1/2]],ColorFunctionScaling->False,Filling->Axis]

Plot the spectrum in the complex plane using (RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D]):

ParametricPlot3D[{Cos[ω],Sin[ω],Log[10,Abs[F]^2]},{ω,0,2π},BoxRatios->{1,1,1}]

(RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction]) will use several properties including linearity:

ExponentialGeneratingFunction[a f[n]+b g[n],n,z]

Multiplication by exponentials:

{ExponentialGeneratingFunction[a^n f[n],n,z],ExponentialGeneratingFunction[b^(-n)f[n],n,z]}

ExponentialGeneratingFunction[Exp[I ω n]f[n],n,z]

Multiplication by polynomials:

{ExponentialGeneratingFunction[ n f[n],n,z],ExponentialGeneratingFunction[n(n+1) f[n],n,z]}

Conjugate:

ExponentialGeneratingFunction[Conjugate[f[n]],n,z]

(RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction]) automatically threads over lists:

ExponentialGeneratingFunction[{a^n,b^n},n,z]

ExponentialGeneratingFunction[{{a^n,b^n},{n,n^2}},n,z]

Equations:

ExponentialGeneratingFunction[a^n==f[n],n,z]

Rules:

ExponentialGeneratingFunction[f[n]->a^n,n,z]

OpenersExampleSubsection1(Spacer1)Special Sequences  (13)

Discrete unit steps:

{ExponentialGeneratingFunction[UnitStep[n],n,z],ExponentialGeneratingFunction[UnitStep[n-3],n,z]}

Table[DiscretePlot[f,{n,-10,10}],{f,{UnitStep[n],UnitStep[n-3]}}]

Discrete ramps:

{ExponentialGeneratingFunction[n UnitStep[n],n,z],ExponentialGeneratingFunction[(n-3)UnitStep[n-3],n,z]}

Table[DiscretePlot[f,{n,-10,10}],{f,{n UnitStep[n],(n-3)UnitStep[n-3]}}]

Polynomials:

{ExponentialGeneratingFunction[n,n,z],ExponentialGeneratingFunction[n^2,n,z]}

Factorial polynomials:

ExponentialGeneratingFunction[Pochhammer[n,Range[0,3]],n,z]

ExponentialGeneratingFunction[FactorialPower[n,Range[0,3]],n,z]

Exponential functions:

ExponentialGeneratingFunction[a^n,n,z]

ExponentialGeneratingFunction[a^n UnitStep[n-2],n,x]

Exponential polynomials:

{ExponentialGeneratingFunction[n a^n,n,z],ExponentialGeneratingFunction[n^2 a^n,n,z]}

Table[DiscretePlot[f,{n,0,40}],{f,{n (10/12)^n,n^2 (10/12)^n}}]

Factorial exponential polynomials:

ExponentialGeneratingFunction[Pochhammer[n,Range[0,3]] a^n,n,z]

ExponentialGeneratingFunction[FactorialPower[n,Range[0,3]] a^n,n,z]

Trigonometric functions:

{ExponentialGeneratingFunction[Sin[ω n+ϕ],n,z],ExponentialGeneratingFunction[Cos[ω n+ϕ],n,z]}

Table[DiscretePlot[f,{n,-20,20}],{f,{Sin[2π/10 n],Cos[2π/10 n]}}]

Trigonometric, exponential and polynomial:

{ExponentialGeneratingFunction[(5/6)^n Sin[ω n],n,z],ExponentialGeneratingFunction[n (5/6)^n Sin[ω n],n,z]}

Table[DiscretePlot[f,{n,0,20}],{f,{(5/6)^n Sin[2π/10 n],n (5/6)^n Sin[2π/10 n]}}]

Combinations of the previous input:

ExponentialGeneratingFunction[n^2 a^n+b^n Sin[ω n] UnitStep[n-2],n,z]

DiscretePlot[n^2 (5/6)^n +(11/12)^n 20Sin[2Pi/10 n]UnitStep[n-2],{n,0,50}]

Different ways of expressing piecewise-defined signals:

ExponentialGeneratingFunction[n (UnitStep[n]-UnitStep[n-6])+a^n UnitStep[n-6],n,z]

ExponentialGeneratingFunction[Piecewise[{{n,n≤5},{a^n,True}}],n,z]

Simplify[%%-%]

Rational functions:

ExponentialGeneratingFunction[1/(n+1),n,z]

ExponentialGeneratingFunction[((n^2)+n+1)/(n+1)^2,n,z]

ExponentialGeneratingFunction[FactorialPower[n,-2],n,z]

Rational exponential functions:

ExponentialGeneratingFunction[a^n/(n+1)^2,n,z]

ExponentialGeneratingFunction[a^n FactorialPower[n,-2],n,z]

Hypergeometric term sequences:

ExponentialGeneratingFunction[1/n!,n,z]

The (RefLink[DiscreteRatio, paclet:ref/DiscreteRatio]) is rational for all hypergeometric term sequences:

DiscreteRatio[1/n!,n]

Many functions give hypergeometric terms:

hl={a^n,n!,Gamma[n],Pochhammer[a,n],FactorialPower[a,n],Binomial[n,a],Binomial[b,n],CatalanNumber[n]};

DiscreteRatio[hl,n]

Any products are hypergeometric terms:

DiscreteRatio[Times@@RandomChoice[hl,3],n]

Transforms of hypergeometric terms:

ExponentialGeneratingFunction[((2^(-2+n))/(Gamma[(1/2)+n])),n,z]

ExponentialGeneratingFunction[n/Binomial[2n,n],n,z]

ExponentialGeneratingFunction[((FactorialPower[a1,n])/(FactorialPower[b1,n]FactorialPower[b2,n])),n,z]

ExponentialGeneratingFunction[Pochhammer[n,k],n,x]

ExponentialGeneratingFunction[n!/CatalanNumber[n],n,x]

Holonomic sequences:

ExponentialGeneratingFunction[LegendreP[n,a],n,z]

A holonomic sequence is defined by a linear difference equation:

DifferenceRootReduce[LegendreP[n,a],n]

Many special function are holonomic sequences in their index:

ExponentialGeneratingFunction[ChebyshevT[n,x],n,z]

ExponentialGeneratingFunction[ChebyshevU[2n,x]^2,n,z]

(RefLink[DifferenceRoot, paclet:ref/DifferenceRoot]) in general results in (RefLink[DifferentialRoot, paclet:ref/DifferentialRoot]) functions:

ExponentialGeneratingFunction[DifferenceRoot[Function[{y,m},{y[m+2]==y[m+1]+y[m],y[0]==0,y[1]==1}]][n],n,z]

Special sequences:

ExponentialGeneratingFunction[BernoulliB[n],n,x]

ExponentialGeneratingFunction[EulerE[n],n,x]

ExponentialGeneratingFunction[Fibonacci[n]/n!,n,z]

ExponentialGeneratingFunction[HarmonicNumber[n]/n!,n,z]

Periodic sequences:

ExponentialGeneratingFunction[Mod[n,3],n,z]

ExponentialGeneratingFunction[Exp[n 2π I/3],n,z]

ExponentialGeneratingFunction[Mod[n^2,5]^3,n,x]

Multivariate exponential generating functions:

ExponentialGeneratingFunction[(a^(n+m)),{n,m},{u,v}]

ExponentialGeneratingFunction[n^2 m^3,{n,m},{u,v}]

ExponentialGeneratingFunction[(a^(n+m))n^2 m^3,{n,m},{u,v}]

ExponentialGeneratingFunction[Sin[n+m]a^n,{n,m},{u,v}]

ExponentialGeneratingFunction[m/(n+1),{n,m},{u,v}]

ExponentialGeneratingFunction[Mod[n+m,2],{n,m},{u,v}]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (1)

Compute the exponential generating function at a point:

ExponentialGeneratingFunction[1,n,0.5]

ExponentialGeneratingFunction[1,n,1/z]

OpenersExampleSection3(Spacer1)Options  (5)

OpenersExampleSubsection2(Spacer1)GenerateConditions  (1)

By default, no conditions are given for where a generating function is convergent:

ExponentialGeneratingFunction[(n + 1)!,n,x]

Use (RefLink[GenerateConditions, paclet:ref/GenerateConditions]) to generate conditions of validity:

ExponentialGeneratingFunction[(n + 1)!,n,x,GenerateConditions->True]

OpenersExampleSubsection3(Spacer1)Method  (1)

Different methods may produce different formulas:

ExponentialGeneratingFunction[Fibonacci[n],n,z]

ExponentialGeneratingFunction[Fibonacci[n],n,z,Method-> "Holonomic"]

OpenersExampleSubsection4(Spacer1)VerifyConvergence  (3)

Setting (RefLink[VerifyConvergence, paclet:ref/VerifyConvergence]) to (RefLink[False, paclet:ref/False]) will treat generating functions as formal objects:

ExponentialGeneratingFunction[n! 2^n,n,x,VerifyConvergence->False]

Setting (RefLink[VerifyConvergence, paclet:ref/VerifyConvergence]) to (RefLink[True, paclet:ref/True]) will verify that the radius of convergence is nonzero:

ExponentialGeneratingFunction[n ! 2^n,n,x,VerifyConvergence->True]

In addition, setting (RefLink[GenerateConditions, paclet:ref/GenerateConditions]) to (RefLink[True, paclet:ref/True]) will display the conditions for convergence:

ExponentialGeneratingFunction[n ! 2^n,n,x,VerifyConvergence->True,GenerateConditions->True]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

(RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction]) effectively computes an infinite sum:

ExponentialGeneratingFunction[n^2,n,z]

Sum[n^2/n! z^n,{n,0,Infinity}]

Linearity:

ExponentialGeneratingFunction[a f[n]+b g[n],n,z]

(RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction]) is closely related to (RefLink[GeneratingFunction, paclet:ref/GeneratingFunction]):

{ExponentialGeneratingFunction[n,n,z],GeneratingFunction[n/n!,n,z]}

(RefLink[ZTransform, paclet:ref/ZTransform]):

{ExponentialGeneratingFunction[n,n,z], ZTransform[n/n!,n,1/z]}

(RefLink[FourierSequenceTransform, paclet:ref/FourierSequenceTransform]):

{ExponentialGeneratingFunction[n,n,Exp[-I*ω]],FourierSequenceTransform[n UnitStep[n]/n!,n,ω]}

OpenersExampleSection5(Spacer1)Possible Issues  (1)

A (RefLink[ExponentialGeneratingFunction, paclet:ref/ExponentialGeneratingFunction]) may not converge for all values of parameters:

{Sum[a^n*n!*x^n/n!/.{a->2,x->1},{n,0,∞}],ExponentialGeneratingFunction[2^n*n!,n,1]}

ExponentialGeneratingFunction[a^n*n!,n,x]

Use (RefLink[GenerateConditions, paclet:ref/GenerateConditions]) to get the region of convergence:

ExponentialGeneratingFunction[n!*a^n,n,x,GenerateConditions->True]

OpenersExampleSection6(Spacer1)Neat Examples  (1)

Create a gallery of exponential generating functions:

flist = {{UnitStep[n+1/2],n,z},{n^2+2,n,z},{1/(2n+1),n,z},{Sin[a n],n,z},{ChebyshevT[n,a],n,z},{HarmonicNumber[n]/n!,n,z},{a^n Sin[n],n,z},{Mod[n,4],n,z},{Power[m,n],{m,n},{u,v}},{m/(n + 1),{m,n},{u,v}}};

Grid[Join[{{f,Text["Exponential Generating Function"]}},Transpose[{flist[[;;,1]],Map[ExponentialGeneratingFunction@@#&,flist]}]],Background->{None,{{None,GrayLevel[.9]}},{{1,1}->Hue[.6,.4,1],{1,2}->Hue[.6,.4,1]}},BaseStyle->{FontFamily->Times,FontSize->12},Dividers->All,FrameStyle->Hue[.6,.4,.8],Spacings->{2,1}]//TraditionalForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeneratingFunction, paclet:ref/GeneratingFunction])  ▪  (RefLink[D, paclet:ref/D])  ▪  (RefLink[Series, paclet:ref/Series])  ▪  (RefLink[SeriesCoefficient, paclet:ref/SeriesCoefficient])  ▪  (RefLink[Sum, paclet:ref/Sum])  ▪  (RefLink[ZTransform, paclet:ref/ZTransform])  ▪  (RefLink[RSolve, paclet:ref/RSolve])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Integer Sequences, paclet:guide/IntegerSequences])}, {▪(RefLinkPlain[Summation Transforms, paclet:guide/SummationTransforms])}})}})