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

Fake Degree Sequence Associated to V(1) and SL(2)

qcat=Annihilator[(q^k - q^(k + 1))/(1 - q^(k + 1))QBinomial[2k,k,q],QS[qk,q^k]] (*compute the linear q-difference equation for q^k Cat(q; k) *)

ann = DFiniteQSubstitute[qcat,{q,2}, Return -> Backsubstitution]  (* compute the linear q-difference equation for q^k Cat(q; k) whose coefficients contains powers of q^{2 k} *)

rec = ApplyOreOperator[ann, f[k]]

rec1 = rec /. {k -> k/2}

rec2 = rec1 /. {f[k/2] -> f[k], f[1 + k/2] -> f[2 + k], f[2 + k/2] -> f[4 + k]} (*  the linear q-difference equation for the fake degree sequence associated to V(1) and SL(2) *)

op = ToOrePolynomial[rec2, f[k]] // Factor (*  the linear q-difference operator for the fake degree sequence associated to V(1) and SL(2) *)

init1 =Table[(q^k - q^(k + 1))/(1 - q^(k + 1))QBinomial[2k,k,q], {k, 0, 10}] // FunctionExpand // Together (* compute the first few terms of  q^k Cat(q; k)*)

fdseq1 = RecurrenceTable[{rec2 ==0, f[0]== init1[[1]], f[1] ==0, f[2] == init1[[2]], f[3] == 0}, f, {k, 0, 10}]  // Together(* use rec2 to compute the first few terms for the fake degree sequence associated to V(1) and SL(2), the even terms are the same as q^k Cat(q; k) *)

Fake Degree Sequence Associated to V(2) and SL(2)

ann2=Annihilator[(q^(n - t) - q^(-n + 1 + 2 t))/(1 - q^(-n + 1+ 2 t)) QFactorial[n, q]/(QFactorial[n -t,q] QFactorial[n -t,q] QFactorial[-n + 2 t,q]),{QS[qn,q^n],QS[qt,q^t]}]  (*compute the annihilators for the summand of the fake degree sequence associated to V(2) and SL(2) *)

{P, Q} =CreativeTelescoping[ann2, QS[qt,q^t] -1, QS[qn,q^n]]

P[[1]] // Factor (* the sixth-order linear q-difference equation for the fake degree sequence associated to V(2) and SL(2) *)

fdSL2[n_,q_]:=Module[{k1,k2,sol1,sol2,s1=0,s2=0},sol1=Solve[2 k1+k2==n&&0≤k1≤n&&0≤k2≤n,{k1,k2},Integers];(*Solve the linear Diophantine equation with constrants*)sol2=Solve[2 k1+k2+1==n&&0≤k1≤n&&0≤k1+1≤n&&0≤k2≤n,{k1,k2},Integers];(*Solve the linear Diophantine equation with constrants*)Do[k1=k1/.sol1[[i,1]];
k2=k2/.sol1[[i,2]];
s1=s1+QFactorial[n,q]/(QFactorial[k1,q] QFactorial[k1,q] QFactorial[k2,q]);(*compute the first sum*),{i,Length[sol1]}];
Do[k1=k1/.sol2[[i,1]];
k2=k2/.sol2[[i,2]];
s2=s2+QFactorial[n,q]/(QFactorial[k1,q] QFactorial[k1+1,q] QFactorial[k2,q]);(*compute the second sum*),{i,Length[sol2]}];
Return[Together[FunctionExpand[s1-s2]]];]; (* a procedure to generate the n-th term of the fake degree sequence associated to V(2) and SL(2)*)

fd =Table[fdSL2[n, q], {n, 0, 10}] (* generate the first 11 terms of the fake degree sequence associated to V(2) and SL(2)*)

init = Table[f[n-1] == fd[[n]], {n, 6}]

rec = ApplyOreOperator[Factor[P[[1]]], f[n]]

fd1 = RecurrenceTable[ Prepend[init, rec ==0], f, {n, 0, 10}] // Together (* compute the first 11 terms of the fake degree sequence associated to V(2) and SL(2) by rec *)

fd1 === fd (* the terms generated by rec is the same as fd  *)

Fake Degree Sequence Associated to V and Sp(4)

ann1=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -6,q] QFactorial[2 n -t -2, q] QFactorial[-n + t +3,q] QFactorial[-n+t+5, q]),{QS[qn,q^n],QS[qt,q^t]}]  (* compute the annihilators for the first summand of the fake degree sequence associated to V and Sp(4), similar comments for anniann4=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -4,q] QFactorial[2 n -t-3, q] QFactorial[-n + t +2,q] QFactorial[-n+t+5, q]),{QS[qn,q^n],QS[qt,q^t]}] , i = 2, .., 8 *)

{P1, Q1} =CreativeTelescoping[ann1, QS[qt,q^t] -1, QS[qn,q^n]](* compute the annihilators for the first sum of the fake degree sequence associated to V and Sp(4), similar comments for {Pi, Qi}, i = 2, .., 8 *)

ann2=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -4,q] QFactorial[2 n -t, q] QFactorial[-n + t +2,q] QFactorial[-n+t+2, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P2, Q2} =CreativeTelescoping[ann2, QS[qt,q^t] -1, QS[qn,q^n]]

ann3=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -6,q] QFactorial[2 n -t-3, q] QFactorial[-n + t +3,q] QFactorial[-n+t+6, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P3, Q3} =CreativeTelescoping[ann3, QS[qt,q^t] -1, QS[qn,q^n]]

ann4=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -4,q] QFactorial[2 n -t-3, q] QFactorial[-n + t +2,q] QFactorial[-n+t+5, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P4, Q4} =CreativeTelescoping[ann4, QS[qt,q^t] -1, QS[qn,q^n]]

ann5=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -4,q] QFactorial[2 n -t-1, q] QFactorial[-n + t +2,q] QFactorial[-n+t+3, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P5, Q5} =CreativeTelescoping[ann5, QS[qt,q^t] -1, QS[qn,q^n]]

ann6=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -2,q] QFactorial[2 n -t-1, q] QFactorial[-n + t +1,q] QFactorial[-n+t+2, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P6, Q6} =CreativeTelescoping[ann6, QS[qt,q^t] -1, QS[qn,q^n]]

ann7=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t -2,q] QFactorial[2 n -t-2, q] QFactorial[-n + t +1,q] QFactorial[-n+t+3, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P7, Q7} =CreativeTelescoping[ann7, QS[qt,q^t] -1, QS[qn,q^n]]

ann8=Annihilator[QFactorial[2 n, q]/(QFactorial[2 n -t,q] QFactorial[2 n -t, q] QFactorial[-n + t ,q] QFactorial[-n+t, q]),{QS[qn,q^n],QS[qt,q^t]}]

{P8, Q8} =CreativeTelescoping[ann8, QS[qt,q^t] -1, QS[qn,q^n]]

M1 = DFinitePlus[P1, P2] (* compute LCLM(P1, ..., P8) to get the annihilator for  the fake degree sequence associated to V and Sp(4)*)

M2 = DFinitePlus[P3, P4]

M3 = DFinitePlus[P5, P6]

M4 = DFinitePlus[P7, P8]

M12 = DFinitePlus[M1, M2]

M34 = DFinitePlus[M3, M4]

M = DFinitePlus[M12, M34](* M is the annihilator for  the fake degree sequence associated to V and Sp(4)*)

LeadingExponent[M[[1]]] (*the order of M is 20*)