OFFSET
0,4
COMMENTS
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). A weak run-sum is the sum of any consecutive constant subsequence.
Do all positive integers appear only finitely many times in this sequence?
EXAMPLE
The a(n) compositions for n = 1, 3, 9, 15, 18:
(1) (21) (4311) (54321) (543321)
(111) (51111) (532221) (654111)
(111111111) (651111) (7611111)
(81111111) (111111111111111111)
(111111111111111)
For example, the weak runs of y = {7,5,4,4,3,3,3,1,1} are {}, {1}, {1,1}, {3}, {4}, {5}, {3,3}, {7}, {4,4}, {3,3,3}, with sums 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, which are all distinct and cover an initial interval, so y is counted under a(31).
MATHEMATICA
norqQ[m_]:=Sort[m]==Range[0, Max[m]];
msubs[s_]:=Join@@@Tuples[Table[Take[t, i], {t, Split[s]}, {i, 0, Length[t]}]];
Table[Length[Select[IntegerPartitions[n], norqQ[Total/@Select[msubs[#], SameQ@@#&]]&]], {n, 0, 15}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Jun 04 2022
STATUS
approved