OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: (1 + 166*x + 121*x^2 )/(1-x)^3. - R. J. Mathar, Mar 10 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Jul 07 2012
E.g.f.: (1 + 168*x + 144*x^2)*exp(x). - G. C. Greubel, Dec 24 2022
MATHEMATICA
CoefficientList[Series[(1+166*x+121*x^2)/(1-x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 07 2012 *)
LinearRecurrence[{3, -3, 1}, {1, 169, 625}, 30] (* Harvey P. Dale, Feb 27 2023 *)
PROG
(Magma) I:=[1, 169, 625]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jul 07 2012
(PARI) a(n)=(12*n+1)^2 \\ Charles R Greathouse IV, Jun 17 2017
(SageMath) [(12*n+1)^2 for n in range(51)] # G. C. Greubel, Dec 24 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved