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(1)=392499, a(2)=2281249, a(3)=5732499, a(n)=3*a(n-1)-3*a(n-2)+ a(n-3) [From Harvey P. Dale, Jul 11 2011]
G.f.: (392499+1103752*x+66249*x^2)/(1-x)^3 [From Harvey P. Dale, Jul 11 2011]
EXAMPLE
For n=1, a(1)=392499; n=2, a(2)=2281249; n=3, a(3)=5732499.
MATHEMATICA
Table[781250n^2-455000n+66249, {n, 25}] (* or *) LinearRecurrence[{3, -3, 1}, {392499, 2281249, 5732499}, 25] (* or *) CoefficientList[Series[ (-392499- 1103752 x-66249 x^2)/(x-1)^3, {x, 0, 25}], x] (* Harvey P. Dale, Jul 11 2011 *)
PROG
(Magma) I:=[392499, 2281249, 5732499]; [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)=781250*n^2-455000*n+66249
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 03 2009
EXTENSIONS
Minor corrections by M. F. Hasler, Oct 08 2014
STATUS
approved