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, Feb 25 2012: (Start)
G.f.: 109*x*(1+x)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = (55n)^2 - (54n)^2 = (10n)^2 + (3n)^2. (End) [G.f. corrected by Georg Fischer, May 11 2019]
MATHEMATICA
CoefficientList[Series[109*x*(x+1)/(1-x)^3, {x, 0, 33}], x]
109*Range[0, 40]^2 (* or *) LinearRecurrence[{3, -3, 1}, {0, 109, 436}, 40] (* Harvey P. Dale, May 18 2012 *)
PROG
(Magma) [109*n^2: n in [0..50]]; /* or */ I:=[0, 109, 436]; [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)=109*n^2 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 16 2010
STATUS
approved