OFFSET
0,6
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
The a(5) = 2 through a(8) = 17 compositions:
(1112) (1113) (1114) (1115)
(2111) (1122) (1222) (1133)
(2211) (2221) (3311)
(3111) (4111) (5111)
(11211) (11122) (11222)
(11311) (11411)
(21112) (12221)
(22111) (21113)
(111121) (22211)
(121111) (31112)
(111131)
(111221)
(112112)
(112211)
(122111)
(131111)
(211211)
For example, the runs-resistance of (111221) is 3 because we have: (111221) -> (321) -> (111) -> (3), while the cuts-resistance is also 3 because we have: (111221) -> (112) -> (1) -> (), so (111221) is counted under a(8).
MATHEMATICA
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&, q, Length[#]>1&]]-1;
degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&, q, Length[#]>0&]]-1;
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], runsres[#]==degdep[#]&]], {n, 0, 10}]
CROSSREFS
The version for binary expansion is A329865.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
Compositions with runs-resistance = cuts-resistance minus 1 are A329869.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 23 2019
STATUS
approved