<<RISC`fastZeil`

Fast Zeilberger Package version 3.61
written by Peter Paule, Markus Schorn, and Axel Riese
Copyright Research Institute for Symbolic Computation (RISC),
Johannes Kepler University, Linz, Austria

?Gosper

Example 3.8: Gauss sum

Gosper[k,{k,0,n}]

Gosper[k,k]

Example 3.9: harmonic numbers

Gosper[1/k,{k,1,n}]

Examples from MMA demonstration in lecture notes p. 44

Gosper[k k!,{k,0,n}]

Gosper[k k!,k]

Gosper[k k!,{k,2,2n}]

Gosper[k k!,{k,a,b}]

Gosper[(4k-1)/(2k-1)^2 16^(-k) Binomial[2k,k]^2,{k,0,n}]

Gosper[(4k-1)/(2k-1)^2 16^(-k) Binomial[2k,k]^2,k]

Gosper[(4k-1)/(2k-1)^2 16^(-k) Binomial[2k,k]^2,{k,0,n}]

Prove[]

Gosper[Binomial[n,k] ,k]

Zeilberger’s algorithm

?Zb

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

Prove[]

Zb[Binomial[n,k],k,n]

Zb[Binomial[n,k],{k,0,Infinity},n]

TimeConstrained[Zb[1/(n^2+k^2),k,n],30]

TTR for Legendre polynomials

Zb[Binomial[n,k]^2 (x-1)^(n-k) (x+1)^k 2^(-n),{k,0,n},n]

Prove[]

Zb[Binomial[n,k]^2 (x-1)^(n-k) (x+1)^k 2^(-n),{k,0,Infinity},n]

TTR for Jacobi polynomials

Zb[Pochhammer[α+1,n]/n! Pochhammer[-n,k] Pochhammer[n+α+β+1,k]/Pochhammer[α+1,k]/k! ((1-x)/2)^k,{k,0,Infinity},n]

TTR for Hermite polynomials

Zb[n!/(k!(n-2k)!) (-1)^k (2x)^(n-2k),{k,0,Infinity},n]

FullForm[%]

%25/.SUM->H

FullForm[%]

ReleaseHold[%27]

FullForm[%]

Non-minimality of Zeilberger’s algorithm

For[d=2,d<=5,d++,
rec[d]=Zb[(-1)^k Binomial[n,k] Binomial[d k,n],{k,0,n},n];
Print[rec[d]];
]

For[d=2,d<=5,d++,
data[d]=Table[Sum[(-1)^k Binomial[n,k] Binomial[d k,n],{k,0,n}],{n,0,10}];
Print[d," --> ",data[d]];
]

<<RISC`Guess`

HolonomicFunctions Package version 1.7.3 (21-Mar-2017)
written by Christoph Koutschan
Copyright Research Institute for Symbolic Computation (RISC),
Johannes Kepler University, Linz, Austria

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

Guess Package version 0.52
written by Manuel Kauers
Copyright Research Institute for Symbolic Computation (RISC),
Johannes Kepler University, Linz, Austria

Table[GuessMinRE[data[d],a[n]],{d,2,5}]

%//TableForm

<<RISC`MultiSum`

Package MultiSum version 2.3 written by Kurt Wegschaider
enhanced by Axel Riese and Burkhard Zimmermann
Copyright Research Institute for Symbolic Computation (RISC),
Johannes Kepler University, Linz, Austria

?FindRecurrence

trinomial sum

frec=FindRecurrence[Binomial[n,j] Binomial[j,i] x^i y^(j-i) z^(n-j),{n},{i,j}]

SumCertificate[frec]

Product of Legendre polynomials

summand for Legendre polynomials:

Binomial[n,k]^2 (x-1)^(n-k) (x+1)^k 2^(-n)/.n->m/.k->j

frec = FindRecurrence[Binomial[n,k]^2 (x-1)^(n-k) (x+1)^k 2^(-n) (2^(-m)) (((-1+x))^(-j+m)) (((1+x))^j) ((Binomial[m,j])^2),{m,n},{j,k}]

simplify the TTR recurrence for P[n,x], P[m,x]

SumCertificate[frec]

find a recurrence that does not contain x

?TimeConstrained

TimeConstrained[frec = FindRecurrence[Binomial[n,k]^2 (x-1)^(n-k) (x+1)^k 2^(-n) (2^(-m)) (((-1+x))^(-j+m)) (((1+x))^j) ((Binomial[m,j])^2),{m,n},{2,2},{j,k},{2,2},FreeOf->{x}],30]

<<RISC`HolonomicFunctions`

HolonomicFunctions Package version 1.7.3 (21-Mar-2017)
written by Christoph Koutschan
Copyright Research Institute for Symbolic Computation (RISC),
Johannes Kepler University, Linz, Austria

annLeg =Annihilator[LegendreP[n,x],{Der[x],S[n]}]//Factor

annLeg =Annihilator[LegendreP[n,x],{S[n],Der[x]}]//Factor

ApplyOreOperator[annLeg,Subscript[P,n][x]]

Non-minimality of Zeilberger’s algorithm

d=3;
Annihilator[Sum[(-1)^k Binomial[n,k] Binomial[d k,n],{k,0,n}],S[n]]//Factor

compare to the result obtained using Zb

rec[3]

?CreativeTelescoping

Dixon’s identity

(∑_(k=0)^∞)(((-1))^k) ((Binomial[2 n, k])^3)=(((((-1))^n) (3 n)!)/(((n!))^3))

f[n_,k_]:=(-1)^k Binomial[2n,k]^3;

{ann,cert}=CreativeTelescoping[(-1)^k Binomial[2n,k]^3,S[k]-1,S[n]]

r[n_,k_]:=(-116 (k^3)+207 (k^4)-147 (k^5)+48 (k^6)-6 (k^7)-784 (k^3) n+1113 (k^4) n-594 (k^5) n+132 (k^6) n-9 (k^7) n-2084 (k^3) (n^2)+2214 (k^4) (n^2)-792 (k^5) (n^2)+90 (k^6) (n^2)-2728 (k^3) (n^3)+1932 (k^4) (n^3)-348 (k^5) (n^3)-1760 (k^3) (n^4)+624 (k^4) (n^4)-448 (k^3) (n^5))/(2 (((2-3 k+(k^2)+6 n-4 k n+4 (n^2)))^3));
g[n_,k_]:=r[n,k]f[n,k];

((ApplyOreOperator[ann[[1]],h[n,k]]/.h->f)+(g[n,k+1]-g[n,k]))/f[n,k]//FunctionExpand//Factor

f2[n_]:=(-1)^n (3n)!/(n!)^3;

Table[Sum[f[n,k],{k,0,2n}]-f2[n],{n,0,10}]

ApplyOreOperator[ann[[1]],f2[n]]//FullSimplify

x-free product recurrence for Legendre polynomials

annProd =Annihilator[LegendreP[i,x] LegendreP[j,x],{S[i],S[j]}]

FindRelation[annProd,Eliminate->{x}]

Factor[%]