
(* << HolonomicFunctions.m *)

(* 1. annihilator for H1[n,k] := Sum[(2k)!/i!(4/3)^i/(2k-3i)!, {i,0,3/2 k}] *)

annH1=First[CreativeTelescoping[Annihilator[(2k)!/i!(4/3)^i/(2k-3i)!, {S[n],S[k],S[i]}], S[i]-1, {S[n],S[k]}]];
(* checked. vs-dim=3. seems to be minimal *)

(* 2. annihilator for H2[n,k] := Sum[(n-4k)!/i!/2^i/(n-4k-2i)!, {i,0,(n-4k)/2}] *)

annH2=First[CreativeTelescoping[Annihilator[(n-4k)!/i!/2^i/(n-4k-2i)!, {S[n],S[k],S[i]}], S[i]-1, {S[n],S[k]}]];
(* checked. vs-dim=2. *)

(* 3. annihilator for H3[n,k] := Sum[(n-4k)!/i!/3^i/(n-4k-3i)!, {i,0,(n-4k)/3}] *)

annH3=First[CreativeTelescoping[Annihilator[(n-4k)!/i!/3^i/(n-4k-3i)!, {S[n],S[k],S[i]}], S[i]-1, {S[n],S[k]}]];
(* checked. vs-dim=3. seems to be minimal *)

(* 4. annihilator for H1[n]H2[n,k]H3[n,k] via closure properties *)
annH123=DFiniteTimes[annH2,annH3,annH1]; (* takes about 7min *)
(* checked. vs-dim=18. *)

(* 5. annihilator for whole summand *)
annSummand = DFiniteTimes[annH123, Annihilator[n!/k! 4^(-k)/(n-4k)!, {S[n],S[k]}]]; 
(* takes about 3min. checked. *)

(* 6. convert to lex order *)
annLex = FGLM[annSummand, OreAlgebra[S[k],S[n]], Lexicographic]; (* takes 2 hours *)

(* 7. compute certificate *)
recs = FindCreativeTelescoping[annLex, S[k]-1, Support -> Table[S[n]^i, {i,0,30}]]; (* takes about 30h *)

(* 8. cross check: correctness of the certificate *)
OreReduce[recs[[1,1]] + (S[k]-1)**recs[[2,1,1]], annLex] (* takes about 10min *)
