A357212 a(n) = number of nonempty subsets of {1,2,...,n} having a partition into two subsets with the same sum of elements.
0, 0, 1, 3, 7, 17, 37, 81, 174, 372, 786, 1650, 3438, 7125, 14666, 30048, 61248, 124439, 251921, 508778, 1025182, 2062286, 4142643, 8312926, 16667004, 33395274
Offset: 1
Examples
The set {1,2,3,4,5,6} has 17 subsets as described, one of which is {1,2,4,5,6}, which partitions as {{1,2,6},{4,5}}
Crossrefs
Partial sums of A232466.
Programs
-
Mathematica
b[n_, i_] := b[n, i] = If[i < 1, If[n == 0, {0}, {}], If[i*(i + 1)/2 < n, {}, b[n, i - 1]~Union~Map[Function[p, p + x^i], b[n + i, i - 1]~Union~b[Abs[n - i], i -1]]]]; Accumulate[Table[Length[b[n, n - 1]], {n, 1, 20}]] (* after Jean-François Alcover; see A232466 *)
Formula
a(n) = Sum_{i=1..n} A232466(i).
Extensions
a(26) from Alois P. Heinz, Sep 17 2022