OFFSET
0,4
COMMENTS
A weak run-sum of a sequence is the sum of any consecutive constant subsequence. For example, the weak run-sums of (3,2,2,1) are {1,2,3,4}.
This is a kind of completeness property, cf.A126796.
EXAMPLE
The a(1) = 1 through a(8) = 7 partitions:
(1) (11) (21) (211) (311) (321) (3211) (3221)
(111) (1111) (2111) (3111) (4111) (32111)
(11111) (21111) (22111) (41111)
(111111) (31111) (221111)
(211111) (311111)
(1111111) (2111111)
(11111111)
MATHEMATICA
normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
msubs[s_]:=Join@@@Tuples[Table[Take[t, i], {t, Split[s]}, {i, 0, Length[t]}]];
wkrs[y_]:=Union[Total/@Select[msubs[y], SameQ@@#&]];
Table[Length[Select[IntegerPartitions[n], normQ[Rest[wkrs[#]]]&]], {n, 0, 15}]
PROG
(PARI) \\ isok(p) tests the partition.
isok(p)={my(b=0, s=0, t=0); for(i=1, #p, if(p[i]<>t, t=p[i]; s=0); s += t; b = bitor(b, 1<<(s-1))); bitand(b, b+1)==0}
a(n) = {my(r=0); forpart(p=n, r+=isok(p)); r} \\Andrew Howroyd,Jan 15 2024
CROSSREFS
For parts instead of weak run-sums we haveA000009.
For multiplicities instead of weak run-sums we haveA317081.
A005811counts runs in binary expansion.
A353835counts distinct run-sums of prime indices.
A353861counts distinct weak run-sums of prime indices.
A353932lists run-sums of standard compositions.
KEYWORD
nonn
AUTHOR
Gus Wiseman,Jun 04 2022
EXTENSIONS
a(31) onwards fromAndrew Howroyd,Jan 15 2024
STATUS
approved