RISC ErgoSum package available at https : // www3 . risc . jku . at/research/combinat/software/ergosum/

<<RISC`GeneratingFunctions`

Package GeneratingFunctions version 0.9 written by Christian Mallinger
Copyright Research Institute for Symbolic Computation (RISC),
Johannes Kepler University, Linz, Austria

deriving three term recurrence for Hermite polynomials from closed form of exponential generating function

defGFher = {f'[z]-2(x-z)f[z]==0,f[0]==1}

rec1 = DE2RE[defGFher,f[z],H[n]]

rec2 = REHadamard[rec1,{H[n+1]-(n+1)H[n]==0,H[0]==1},H[n]]

ode2=RE2DE[rec2,H[n],g[z]]

?DifferentialRoot

TimeConstrained[DSolve[ode2,g[z],z],20]

TimeConstrained[DSolve[{-1-(-1+2 x z-2 (z^2)) g[z]+2 (z^3) g'[z]==0,g[0]==1},g[z],z],20]

Generating function of Chebyshev polynomials of the first kind

recCheb1={T[n+2]-2x T[n+1]+T[n]==0,T[0]==1,T[1]==x}

deCheb1=RE2DE[recCheb1,T[n],F[z]]

Solve[deCheb1,F[z]]

derive a recurrence for (ChebyshevT[n, x])+(((x+1))^n)

reMon={p[n+1]-(1+x)p[n] ==0,p[0]==1}

re1 = recCheb1/.{T->a}
re2 = reMon/.p->a

REPlus[re1,re2,a[n]]

reLeg = {(n+2)p[n+2]-(2n+3)x p[n+1]+(n+1)p[n]==0,p[0]==1,p[1]==x}

Generating function for Legendre polynomials

F(z)=(∑_(n=0)^∞)(z^n) (LegendreP[n, x])

deLeg=RE2DE[reLeg,p[n],f[z]]

DSolve[deLeg,f[z],z]

Christoffel - Darboux formula for Legendre polynomials (∑_(k=0)^n)(1/2) (2 k+1) (LegendreP[k, 1]) (LegendreP[k, x])

summand = REHadamard[reLeg,{(2n+1)p[n+1]-(2n+3)p[n]==0,p[0]==1/2},p[n]]

sumCD = RECauchy[summand,{p[n]==1},p[n]]

s[n_,x_]:=Sum[(2k+1)/2 LegendreP[k,x],{k,0,n}]

data = Table[Factor[s[nn,x]],{nn,0,30}];

Take[data,3]

GuessRE[data,p[n]]

sumCD2 = %[[1]]

REPlus[sumCD,{(2+n) (5+2 n) p[n]+(-1-15 x-16 n x-4 (n^2) x) p[1+n]+(2+n) (3+2 n) p[2+n]==0,p[0]==-(1/2),p[1]==-(1/2) (1+3 x)},p[n]]

%[[All,2]]

%//Factor

REPlus[sumCD[[1]],sumCD2[[1]],p[n]]

prove closed form for sumCD: (((n+1) ((LegendreP[n+1, x])-(LegendreP[n, x])))/(2 (x-1)))

MINUSreLeg = {(1+n) p[n]-(3+2 n) x p[1+n]+(2+n) p[2+n]==0,p[0]==-1,p[1]==-x}

compute a recurrence for the closed form:

reCF=REHadamard[{(n+1)p[n+1]-(n+2) p[n]==0,p[0]==1/(2(x-1))},REPlus[RESubsequence[reLeg,p[n],n+1],MINUSreLeg,p[n]],p[n]]

simplify the initial conditions for easier comparison:

Factor/@Rest[reCF][[All,2]]

sumCD2

REPlus[sumCD2[[1]],reCF[[1]],p[n]]

same recurrence as for the closed form