<<Hyper.m

?Hyper

Hyper[(n-1)y[n+2]-(3n-2)y[n+1]+2n y[n]==0,y[n]]

Hyper[(n-1)y[n+2]-(3n-2)y[n+1]+2n y[n],y[n]]

Hyper[(n-1)y[n+2]-(3n-2)y[n+1]+2n y[n],y[n],Solutions->All]

<<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

We continue with the last example for Zeilberger’s algorithm from GosperZeilberger.nb (related to non-minimality)

d=3;
rec=Zb[(-1)^k Binomial[n,k] Binomial[d k,n],{k,0,n},n]

As before, we extract the recurrence in a way that can be processed (Note, that the RHS is zero for all n≥0 as discussed last time)

rec = ReleaseHold[rec][[1,1]]/.SUM->a

Hyper[rec,a[n],Solutions->All]

So, (((-3))^n) that we identified as the closed form of the sum the last time, is the only hypergeometric solution of this recurrence.

Irrationality of ζ(3) (an example taken from the wikipedia entry on Petkovšek’s algorithm)

rec=Zb[Binomial[n,k]^2 Binomial[n+k,k]^2,{k,0,n},n]

rec = ReleaseHold[rec][[1,1]]/.SUM->a

Hyper[rec,a[n],Solutions->All]

this proves that ∑(((({{n}, {k}})))^2)(((({{n+k}, {k}})))^2) has no hypergeometric solutions.

<<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

input = Sum[Binomial[d n,a n+1],{d,5},{a,2,3}]

ann=Annihilator[input,S[n]]//Factor;

Support[ann]

Exponent[ann,n]

data = Table[input,{n,0,500}];

<<RISC`Guess`

Package GeneratingFunctions version 0.8 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

rec=GuessMinRE[data,a[n]];

rec=Factor/@rec;

Cases[rec,a[_],Infinity]//Union

Exponent[rec,n]

TimeConstrained[Hyper[rec,a[n],Solutions->All],30]

TimeConstrained[Hyper[rec,a[n]],30]