|
|
A245764
|
|
a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n).
|
|
2
|
|
|
2, 4, 14, 20, 42, 52, 86, 100, 146, 164, 222, 244, 314, 340, 422, 452, 546, 580, 686, 724, 842, 884, 1014, 1060, 1202, 1252, 1406, 1460, 1626, 1684, 1862, 1924, 2114, 2180, 2382, 2452, 2666, 2740, 2966, 3044, 3282, 3364, 3614, 3700, 3962, 4052, 4326, 4420
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Sum of the parts in the partitions of 2n+2 and 2n-2 into two odd parts.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 2*(1 + x^2)*(1 + x + 2 x^2)/((1 - x)^3*(1 + x)^2).
Recurrence: a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n>4.
a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n).
a(n) = (2n + 2)*ceiling((n + 1)/2) + (2n - 2)*ceiling((n - 1)/2).
|
|
EXAMPLE
|
a(0) = 2; There are no partitions of 2(0)-2 = -2, and the odd partitions of 2(0)+2 = 2 into two odd parts is (1,1). The sum of these parts is 2.
a(2) = 14; The partitions of 2(2)-2 = 2 into two odd parts is (1,1) and the partitions of 2(2)+2 = 6 into two odd parts is (5,1) and (3,3). The sum of the parts in these partitions is 1 + 1 + 5 + 1 + 3 + 3 = 14.
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[2n^2 + n + 2 + n(-1)^n, {n, 0, 50}]
CoefficientList[Series[2 (1 + x^2) (1 + x + 2 x^2)/((1 - x)^3 (1 + x)^2), {x, 0, 50}], x]
|
|
PROG
|
(Magma) [2*(n^2 + 1) + n*(1 + (-1)^n) : n in [0..50]];
(PARI) vector(100, n, 2*((n-1)^2 + 1) + (n-1)*(1 - (-1)^n)) \\ Derek Orr, Jul 31 2014
(GAP) List([0..10^3], n->2*(n^2+1)+n*(1+(-1)^n)); # Muniru A Asiru, Feb 04 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|