I'm interested in solving the following difference equation: $x[k-1]+(k^2+k+a)/x[k]=b$, $k=1,2,\ldots$, where $a,b$ are fixed positive numbers; let's say $x[1]=c>0$. Mathematica's RSolve
function doesn't yield the general solution.
RSolve[{x[k - 1] + (k^2 + k + a)/x[k] == b}, x, k]
I tried RecurrenceTable
. It produced something that looks like a cont fraction. Does anyone recognize it?
RecurrenceTable[{x[k - 1] + (k^2 + k + a)/x[k] == b,
x[1] == c}, x, {k, 10}]
{c, (6 + a)/(b - c), (12 + a)/(b - (6 + a)/(b - c)), (20 + a)/(
b - (12 + a)/(b - (6 + a)/(b - c))), (30 + a)/(
b - (20 + a)/(b - (12 + a)/(b - (6 + a)/(b - c)))), (42 + a)/(
b - (30 + a)/(b - (20 + a)/(b - (12 + a)/(b - (6 + a)/(b - c))))), (
56 + a)/(b - (42 + a)/(
b - (30 + a)/(
b - (20 + a)/(b - (12 + a)/(b - (6 + a)/(b - c)))))), (72 + a)/(
b - (56 + a)/(
b - (42 + a)/(
b - (30 + a)/(
b - (20 + a)/(b - (12 + a)/(b - (6 + a)/(b - c))))))), (90 + a)/(
b - (72 + a)/(
b - (56 + a)/(
b - (42 + a)/(
b - (30 + a)/(
b - (20 + a)/(b - (12 + a)/(b - (6 + a)/(b - c)))))))), (
110 + a)/(
b - (90 + a)/(
b - (72 + a)/(
b - (56 + a)/(
b - (42 + a)/(
b - (30 + a)/(
b - (20 + a)/(b - (12 + a)/(b - (6 + a)/(b - c)))))))))}
I suspect the continued fraction is probably a hypergeometric function of some sort.
Table[(n - 4) (n - 5), {n, 7, 50}]
$\endgroup$