OFFSET
0,3
FORMULA
a(n) = ((n + 1) / 2)^2 if n is odd, otherwise (n^2 + n) / 2.
a(n) = [x^n] -(x*(x^3 + x^2 + 3*x + 1))/(x^2 - 1)^3.
a(n) = n! * [x^n] (1/4)*((1 + x*(x + 4))*sinh(x) + x*(2*x + 3)*cosh(x)).
MAPLE
a := n -> (1/8)*(((3*n + 1) + (n - 1)*(-1)^n)*(n + 1)):
# Or:
a := n -> ifelse(irem(n, 2) = 1, ((n + 1) / 2)^2, (n^2 + n)/2):
seq(a(n), n = 0..54);
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 30 2022
STATUS
approved