OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
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*(-28 - 215*x - 45*x^2)/(x-1)^3.
576*a(n) + 1 = (288*n - 161)^2. - Vincenzo Librandi, Feb 09 2012
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: exp(x)*(144*x^2 - 17*x + 45) - 45.
a(n) = (9*n - 5)*(16*n - 9). (End)
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {28, 299, 858}, 40]
Table[144n^2-161n+45, {n, 50}] (* Harvey P. Dale, Nov 19 2023 *)
PROG
(Magma) I:=[28, 299, 858]; [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)=144*n^2-161*n+45 \\ Charles R Greathouse IV, Dec 23 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 15 2009
STATUS
approved