OFFSET
1,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
G.f.: x*( 1+3*x+x^2+x^3 ) / ((1+x)^2*(x-1)^4). - R. J. Mathar, Nov 24 2011
a(n) = n*(3+2*n^2+4*n+(-1)^n)/8. - R. J. Mathar, Jun 23 2023
MATHEMATICA
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 5, 12, 26, 45, 75}, 50] (* Harvey P. Dale, Apr 27 2019 *)
PROG
(Haskell)
a199771 = sum . a199332_row
(PARI) a(n)=([0, 1, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0; 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 1, 0; 0, 0, 0, 0, 0, 1; -1, 2, 1, -4, 1, 2]^(n-1)*[1; 5; 12; 26; 45; 75])[1, 1] \\ Charles R Greathouse IV, Jun 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 23 2011
STATUS
approved