A353863 Number of integer partitions of n whose weak run-sums cover an initial interval of nonnegative integers.
1, 1, 1, 2, 2, 3, 4, 6, 7, 10, 11, 16, 20, 24, 30, 43, 47, 62, 79, 94, 113, 143, 170, 211, 256, 307, 372, 449, 531, 648, 779, 926, 1100, 1323, 1562, 1864, 2190, 2595, 3053, 3611, 4242, 4977, 5834, 6825, 7973, 9344, 10844, 12641, 14699, 17072, 19822
Offset: 0
Keywords
Examples
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)
Crossrefs
For parts instead of weak run-sums we have A000009.
For multiplicities instead of weak run-sums we have A317081.
A005811 counts runs in binary expansion.
A353835 counts distinct run-sums of prime indices.
A353861 counts distinct weak run-sums of prime indices.
A353932 lists run-sums of standard compositions.
Programs
-
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}]
-
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
Extensions
a(31) onwards from Andrew Howroyd, Jan 15 2024
Comments