login
A359366
a(n) = (1/8)*(((3*n + 1) + (n - 1)*(-1)^n)*(n + 1)).
0
0, 1, 3, 4, 10, 9, 21, 16, 36, 25, 55, 36, 78, 49, 105, 64, 136, 81, 171, 100, 210, 121, 253, 144, 300, 169, 351, 196, 406, 225, 465, 256, 528, 289, 595, 324, 666, 361, 741, 400, 820, 441, 903, 484, 990, 529, 1081, 576, 1176, 625, 1275, 676, 1378, 729, 1485
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