OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From Harvey P. Dale, May 24 2011: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=1, a(1)=2, a(2)=13.
G.f.: (1 - x + 10*x^2)/(1-x)^3. (End)
E.g.f.: (1 + x + 5*x^2)*exp(x). - G. C. Greubel, Dec 03 2023
MATHEMATICA
Table[5*n^2 - 4*n + 1, {n, 0, 100}]
LinearRecurrence[{3, -3, 1}, {1, 2, 13}, 100] (* or *) CoefficientList[ Series[ (-10 x^2+x-1)/(x-1)^3, {x, 0, 100}], x] (* Harvey P. Dale, May 24 2011 *)
PROG
(Magma) [5*n^2 - 4*n + 1: n in [0..50]]; // Vincenzo Librandi, Jun 19 2011
(PARI) a(n)=5*n^2-4*n+1 \\ Charles R Greathouse IV, Oct 16 2015
(SageMath) [5*n^2-4*n+1 for n in range(41)] # G. C. Greubel, Dec 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 20 2011
EXTENSIONS
Edited by Franklin T. Adams-Watters, May 20 2011
STATUS
approved