OFFSET
0,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
G.f.: (1 + x + 6*x^3 - x^4 + x^5)/(1 - x^2)^3.
E.g.f.: (1 + x)*(cosh(x) + x*sinh(x)).
a(n) = (1 + n + n^2 + (-1)^n*(1 + n - n^2))/2. - Stefano Spezia, Jan 07 2026
MAPLE
a:= n-> (d-> (n-d+2)^d)(n mod 2+1):
seq(a(n), n=0..57); # Alois P. Heinz, Jan 07 2026
MATHEMATICA
Riffle[#, #^2] & [Range[1, 100, 2]] (* Paolo Xausa, Jan 07 2026 *)
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, 1, 3, 9, 5, 25}, 60] (* Harvey P. Dale, Mar 15 2026 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jan 07 2026
STATUS
approved
