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.: 97*x*(1+x)/(1-x)^3. - Vincenzo Librandi, Feb 25 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Feb 25 2012
a(n) = (49n)^2 - (48n)^2 = (9n)^2 + (4n)^2. - Vincenzo Librandi, Feb 25 2012
MATHEMATICA
CoefficientList[Series[97*x*(x+1)/(1-x)^3, {x, 0, 33}], x] (* Vincenzo Librandi, Feb 25 2012 *)
97*Range[0, 40]^2 (* or *) LinearRecurrence[{3, -3, 1}, {0, 97, 388}, 40] (* Harvey P. Dale, Mar 12 2022 *)
PROG
(Magma) [97*n^2: n in [0..50]]; /* or */ I:=[0, 97, 388]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 25 2012
(PARI) a(n)=97*n^2 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 16 2010
STATUS
approved