OFFSET
1,1
COMMENTS
This equation is used for worked examples in the Robertson paper.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
John P. Robertson, Solving the generalized Pell equation x^2 - Dy^2 = N
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1298,0,0,0,-1).
FORMULA
G.f.: x*(x+1)*(3*x^6+8*x^5+53*x^4+160*x^3+53*x^2+8*x+3) / ((x^4-36*x^2-1)*(x^4+36*x^2-1)).
a(n) = 1298*a(n-4)-a(n-8).
MATHEMATICA
CoefficientList[Series[(x + 1) (3 x^6 + 8 x^5 + 53 x^4 + 160 x^3 + 53 x^2 + 8 x + 3) / ((x^4 - 36 x^2 - 1) (x^4 + 36 x^2 - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 17 2013 *)
LinearRecurrence[{0, 0, 0, 1298, 0, 0, 0, -1}, {3, 11, 61, 213, 4107, 14339, 79189, 276477}, 30] (* Harvey P. Dale, Aug 26 2013 *)
PROG
(PARI) Vec(x*(x+1)*(3*x^6+8*x^5+53*x^4+160*x^3+53*x^2+8*x+3)/((x^4-36*x^2-1)*(x^4+36*x^2-1)) + O(x^100))
(Magma) I:=[3, 11, 61, 213, 4107, 14339, 79189, 276477]; [n le 8 select I[n] else 1298*Self(n-4)-Self(n-8): n in [1..30]]; // Vincenzo Librandi, Aug 17 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Aug 16 2013
STATUS
approved