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
From Vincenzo Librandi, Jul 06 2012: (Start)
G.f.: (1+2*x+7*x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
a(n) = 2*A005476(n) + 1. - Bruno Berselli, Jul 06 2012
E.g.f.: exp(x)*(1 + 4*x + 5*x^2). - Elmo R. Oliveira, Oct 31 2024
MATHEMATICA
CoefficientList[Series[(7*x^2+2*x+1)/(1-x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Jul 06 2012 *)
Table[5n^2-n+1, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {1, 5, 19}, 50] (* Harvey P. Dale, Aug 06 2022 *)
PROG
(Magma) [ 5*n^2-n+1: n in [0..50] ];
(PARI) a(n)=5*n^2-n+1 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Vincenzo Librandi, Jan 29 2010
EXTENSIONS
Replaced definition with formula. - N. J. A. Sloane, Mar 03 2010
STATUS
approved