OFFSET
2,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: z^2*(1+3z+5z^2)/[(1-z)^3*(1+z)^2]. - Emeric Deutsch, Jan 25 2004
a(n) ~ 9*n^2/8. - Charles R Greathouse IV, May 29 2026
MATHEMATICA
Drop[CoefficientList[Series[z^2(1+3z+5z^2)/((1-z)^3(1+z)^2), {z, 0, 50}], z], 2] (* Harvey P. Dale, Dec 31 2021 *)
(* Alternative: *)
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 4, 11, 17, 30}, 50] (* Harvey P. Dale, Dec 31 2021 *)
PROG
(Haskell)
a026381 = flip a026374 2 -- Reinhard Zumkeller, Feb 22 2014
(PARI) a(n)=(9*n^2+(-14-n%2*6)*n+[0, 11][n%2+1])/8 \\ Charles R Greathouse IV, May 29 2026
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved
