OFFSET
1,3
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
G.f.: x*(-1 - x - x^2 - 2 x^3 - x^5)/(-1 + x^2)^3.
a(n+1) = n/2+3*n^2/8+3/4+(-1)^n*(1/4+n/2-n^2/8). - R. J. Mathar, Jun 15 2023
MATHEMATICA
c[1] = 1; c[2] = 1;
c[n_] := If[OddQ[n], c[n - 2] + n, 2 c[n - 1] - n + 1]
Table[c[n], {n, 1, 120}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 24 2023
STATUS
approved