OFFSET
1,1
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Vincenzo Librandi, X^2-AY^2=1
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 3*a(n-1) -3*a(n-2) +a(n-3).
G.f: x*(1010 + 2267*x + 85*x^2)/(1-x)^3.
E.g.f.: -85 + (85 + 925*x + 1681*x^2)*exp(x). - G. C. Greubel, Feb 23 2019
MAPLE
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {1010, 5297, 12946}, 30]
Table[1681n^2-756n+85, {n, 40}] (* Harvey P. Dale, Sep 25 2024 *)
PROG
(Magma) I:=[1010, 5297, 12946]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]];
(PARI) a(n) = 1681*n^2 - 756*n + 85.
(Sage) [1681*n^2 - 756*n + 85 for n in (1..40)] # G. C. Greubel, Feb 23 2019
(GAP) List([1..40], n-> 1681*n^2 - 756*n + 85) # G. C. Greubel, Feb 23 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 23 2009
STATUS
approved