A209535 Number of partitions of 0 of the form [x(1)+x(2)+...+x (j)] - [y(1)+y(2)+...+y(k)] where the x(i) are distinct positive integers <=n and the y(i) are distinct positive integers <= n.
1, 2, 6, 10, 19, 35, 60, 96, 160, 260, 404, 629, 953, 1437, 2166, 3190, 4634, 6750, 9666, 13762, 19538, 27459, 38275, 53159, 73323, 100548, 137412, 186696, 252232, 339848, 455448, 607548, 808252, 1070396, 1412621, 1858845, 2436445
Offset: 1
Keywords
Examples
0 = 1-1 = 2-2 = 3-3 = 3-(1+2) = (1+2)-3 = (1+2)-(1+2), so that a(3) = 6.
Programs
-
Mathematica
p[n_] := PartitionsQ[Range[1, n]]; l[n_] := Length[p[n]]; s[n_] := Apply[Plus, p[n]^2]; Table[s[n], {n, 1, 45}] (* A029536 *)
Formula
Let q (h) be the number of partitions of h>=1 into distinct parts, as in A000009. There are q(h)^2 ways to choose the sets {x(1),...,x(j)} and {y(1),...,y(k)} each having sum h. Consequently, there are q(1)^2 + q(2)^2 + ... + q(n)^2 partitions of 0 as described in the Name section.