Here is a method that gets you a good way forward:
Set up the recursions and initial conditions first:
Transpose[Thread /@
Thread[Array[C[##][k] &, {2, 2}] ==
{{a - 2 k, -k (k - 1) - b}, {1, 0}}.Array[C[##][k-1] &, {2, 2}]]]
{{C[1, 1][k] == (a - 2 k) C[1, 1][-1 + k] + (-b - (-1 + k) k) C[2, 1][-1 + k],
C[2, 1][k] == C[1, 1][-1 + k]},
{C[1, 2][k] == (a - 2 k) C[1, 2][-1 + k] + (-b - (-1 + k) k) C[2, 2][-1 + k],
C[2, 2][k] == C[1, 2][-1 + k]}}
and
Transpose[Thread /@ Thread[Array[C[##][1] &, {2, 2}] == {{-2 + a, -b}, {1, 0}}]]
{{C[1, 1][1] == -2 + a, C[2, 1][1] == 1},
{C[1, 2][1] == -b, C[2, 2][1] == 0}}
Note the form of the equations for C[2, 1][k]
and C[2, 2][k]
. As it turns out, since they are just expressible in terms of C[1, 1][k]
and C[1, 2][k]
, we can convert the recurrences for C[1, 1][k]
and C[1, 2][k]
into three-term recurrences:
RSolve[{C[1, 1][k] == (a - 2 k) C[1, 1][-1 + k] + (-b - (-1 + k) k) C[1, 1][-2 + k],
C[1, 1][1] == -2 + a, C[1, 1][0] == 1}, C[1, 1], k]
RSolve[{C[1, 2][k] == (a - 2 k) C[1, 2][-1 + k] + (-b - (-1 + k) k) C[1, 2][-2 + k],
C[1, 2][1] == -b, C[1, 2][0] == 0}, C[1, 2], k]
In fact, you should now notice that both are just the same recurrence, but with different initial conditions. Unfortunately, if you try to execute any of those, you end up with a DifferenceRoot[]
object, which does not give you new information. You might as well just set up the DifferenceRoot[]
at the outset:
sol[a_, b_, p_, q_] := DifferenceRoot[Function[{y, n},
{(2 + 3 n + n^2 + b) y[n] + (4 + 2 n - a) y[1 + n] + y[2 + n] == 0,
y[0] == p, y[1] == q}]]
and then
left = sol[a, b, 1, a - 2]; right = sol[a, b, 0, -b];
Compare the result with evaluating the explicit product for the first 12 members:
And @@ Table[Array[Function[k, {{a - 2 (n - k + 1), -(n - k + 1) ((n - k + 1) - 1) - b},
{1, 0}}], n, 1, Dot] ==
{{left[n], right[n]}, {left[n - 1], right[n - 1]}} // Simplify,
{n, 12}]
True
As an aside, the sharp-eyed might recognize this to be a disguised version of the recurrence for evaluating the numerators and denominators of a continued fraction.
For instance:
With[{n = 10},
ContinuedFractionK[-k (k - 1) - b, a - 2 k, {k, 1, n}] ==
right[n]/left[n] // Simplify]
True
matrices[n_]:=Rest[FoldList[Dot,IdentityMatrix[2],Table[{{a-2 k,-k (k-1)-b},{1,0}},{k,1,n}]]] Grid[{TraditionalForm[CoefficientList[#,{a,b}]]&/@matrices[10][[All,2,1]]}//Transpose]
The first element in the coefficient matrices matches the recurrence {a(0)=1, a(1)=2, (n^2+n)*a(n)+(-4-2*n)*a(n+1)+a(n+2)}. OEIS A052897 $\endgroup$