|
|
A225144
|
|
a(n) = Sum_{i=n..2*n} i^2*(-1)^i.
|
|
5
|
|
|
0, 3, 11, 18, 42, 45, 93, 84, 164, 135, 255, 198, 366, 273, 497, 360, 648, 459, 819, 570, 1010, 693, 1221, 828, 1452, 975, 1703, 1134, 1974, 1305, 2265, 1488, 2576, 1683, 2907, 1890, 3258, 2109, 3629, 2340, 4020, 2583, 4431, 2838, 4862, 3105, 5313, 3384
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
3 and 11 are the only primes in the sequence.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(3+11*x+9*x^2+9*x^3)/(1-x^2)^3.
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6).
a(n) = n*(4*n+(n-1)*(-1)^n+2)/2.
|
|
EXAMPLE
|
a(6) = 6^2-7^2+8^2-9^2+10^2-11^2+12^2 = 93.
a(7) = -7^2+8^2-9^2+10^2-11^2+12^2-13^2+14^2 = 84.
|
|
MATHEMATICA
|
Table[Sum[i^2 (-1)^i, {i, n, 2 n}], {n, 0, 50}]
|
|
PROG
|
(Magma) [&+[i^2*(-1)^i: i in [n..2*n]]: n in [0..50]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|