OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n - k) * A367964(n, k).
a(2*n) = n*(3*n+2) = A045944(n).
a(2*n-1) = n^2 = A000290(n).
G.f.: x*(1 + 5*x + x^2 + x^3)/(1 - x)^3*(1 + x)^3). - Stefano Spezia, Dec 07 2023
MAPLE
a := n -> (1/8)*(4*n^2 + 6*n + (-1)^n*(2*n*(n + 1) - 1) + 1):
seq(a(n), n = 0..55);
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 1, 5, 4, 16, 9}, 100] (* Paolo Xausa, Dec 07 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Dec 07 2023
STATUS
approved