login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A239292
(sum of all odd parts of all strict partitions of n) - (sum of all even parts of all strict partitions of n); for "strict", see Comments.
1
0, 1, -2, 2, 0, 3, -4, -1, 4, 4, 0, 0, 4, -2, 0, 1, 16, 6, 4, 2, 8, 8, 14, 4, 20, 18, 22, 32, 32, 32, 28, 32, 52, 56, 64, 83, 76, 92, 112, 130, 140, 168, 172, 198, 212, 256, 288, 318, 368, 416, 456, 527, 564, 640, 712, 806, 884, 985, 1116, 1224, 1344, 1496
OFFSET
0,3
COMMENTS
A strict partition is one having distinct parts. a(n) < 0 if and only if n is one of these: 2,6,7,13.
LINKS
FORMULA
a(n) = A116682(n) - A116684(n) for n >= 0.
EXAMPLE
The strict partitions of 6 are 6, 51, 42, 321. The sum of all the odd parts is 10 and the sum of all the even parts is 14, so that a(6) = -4.
MAPLE
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0,
`if`(n=0, [1, 0], b(n, i-1) +`if`(i>n, 0, (p->p+
[0, p[1]*`if`(irem(i, 2)=1, i, -i)])(b(n-i, i-1)))))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=0..80); # Alois P. Heinz, Mar 15 2014
MATHEMATICA
d[n_] := d[n] = Select[IntegerPartitions[n], DeleteDuplicates[#] == # &]; Map[Total[Select[#, OddQ]] - Total[Select[#, EvenQ]]&[Flatten[d[#]]] &, -1 + Range[55]] (* Peter J. C. Moses, Mar 14 2014 *)
b[n_, i_] := b[n, i] = If[n > i (i + 1)/2, 0,
If[n == 0, {1, 0}, b[n, i - 1] + If[i > n, 0, Function[p, p +
{0, p[[1]]*If[Mod[i, 2] == 1, i, -i]}][b[n - i, i - 1]]]]];
a[n_] := b[n, n][[2]];
a /@ Range[0, 80] (* Jean-François Alcover, May 31 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Clark Kimberling, Mar 14 2014
STATUS
approved