OFFSET
1,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,4,0,-6,0,4,0,-1).
FORMULA
a(n) = 4*a(n-2) - 6*a(n-4) + 4*a(n-6) - a(n-8).
G.f.: x*(1 + x + x^3 - x^4)/(-1 + x^2)^4.
E.g.f.: ((18*x + 6*x^2)*cosh(x) + (6 + 6*x + 6*x^2 + x^3)*sinh(x))/24. - Stefano Spezia, Jun 10 2023
48*a(n) = (n+1) * (n^2 +(-1)^n*n^2 -4*(-1)^n*n +8*n -6*(-1)^n +6). - R. J. Mathar, Jun 22 2023
MATHEMATICA
c[1] = 1; c[2] = 1;
c[n_] := If[OddQ[n], c[n - 2] + n, c[n - 2] + c[n - 1]]
Table[c[n], {n, 1, 120}]
PROG
(PARI) a(n) = if(n%2, (n+1)^2/4, n*(n+1)*(n+2)/24); \\ Kevin Ryde, Jun 10 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 24 2023
STATUS
approved