OFFSET
1,1
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-1,-1,0,2,-1).
FORMULA
From Stefano Spezia, Jun 20 2020: (Start)
G.f.: 4*x*(1 + x^2 + 2*x^3 + 2*x^4)/((1 - x)^4*(1 + 2*x + 2*x^2 + x^3)).
a(n) = 2*a(n-1) - a(n-3) - a(n-4) + 2*a(n-6) - a(n-7) for n > 7. (End)
a(n) = 2/3*n^3 - n^2/3 + 4/3*n + O(1). - Charles R Greathouse IV, May 31 2026
MATHEMATICA
LinearRecurrence[{2, 0, -1, -1, 0, 2, -1}, {4, 8, 20, 44, 84, 140, 224}, 50] (* Paolo Xausa, Jun 13 2026 *)
PROG
(PARI) a(n)=(2*n^3-n^2+4*n+247608\8^(n%6)%8)/3 \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 13 2020
EXTENSIONS
Terms a(8) and beyond from Giovanni Resta, Jun 20 2020
STATUS
approved
