|
|
A129370
|
|
a(n) = n^2 - (n-1)^2*(1 - (-1)^n)/8.
|
|
13
|
|
|
0, 1, 4, 8, 16, 21, 36, 40, 64, 65, 100, 96, 144, 133, 196, 176, 256, 225, 324, 280, 400, 341, 484, 408, 576, 481, 676, 560, 784, 645, 900, 736, 1024, 833, 1156, 936, 1296, 1045, 1444, 1160, 1600, 1281, 1764, 1408
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (1/8)*( (7*n^2 + 2*n - 1) + (-1)^n*(n-1)^2 ).
G.f.: x*(1 + 4*x + 5*x^2 + 4*x^3)/(1-x^2)^3.
E.g.f.: (1/4)*( x*(5+4*x)*cosh(x) - (1-4*x-3*x^2)*sinh(x) ). - G. C. Greubel, Jan 31 2024
|
|
MATHEMATICA
|
Table[n^2-(n-1)^2 (1-(-1)^n)/8, {n, 0, 50}] (* Harvey P. Dale, Oct 22 2011 *)
|
|
PROG
|
(Magma) [n^2 -(n-1)^2*(n mod 2)/4: n in [0..60]]; // G. C. Greubel, Jan 31 2024
(SageMath) [n^2 -(n-1)^2*(n%2)/4 for n in range(61)] # G. C. Greubel, Jan 31 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|