OFFSET
1,3
COMMENTS
Here, a multiset is a finite weakly increasing sequence of positive integers.
The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
EXAMPLE
The a(1) = 1 through a(8) = 16 multisets:
{1} {11} {12} {13} {14} {15} {16} {17}
{111} {112} {113} {33} {115} {116}
{1111} {122} {114} {124} {125}
{1112} {123} {133} {134}
{11111} {1113} {1114} {233}
{1122} {1123} {1115}
{11112} {1222} {1124}
{111111} {11113} {1133}
{11122} {1223}
{111112} {11114}
{1111111} {11123}
{11222}
{111113}
{111122}
{1111112}
{11111111}
MATHEMATICA
uncha[tar_, ini_]:=(cur={ini}; Do[AppendTo[cur, tar[[k]]-If[k==1, ini, cur[[k]]]], {k, 1, Length[tar]}]; cur);
greseq[m_]:=Select[Table[uncha[m, i], {i, 1, Max[m]}], LessEqual@@#&]=={};
Table[Length[Select[Reverse/@IntegerPartitions[n], greseq]], {n, 30}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 13 2025
STATUS
approved
