OFFSET
1,3
COMMENTS
A composition of n is a finite sequence of positive integers with sum n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.
These are non-constant compositions with equal run-lengths (A329738).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{d|n} (A003242(d) - 1). - Andrew Howroyd, Dec 30 2020
EXAMPLE
The a(3) = 2 through a(6) = 15 compositions:
(1,2) (1,3) (1,4) (1,5)
(2,1) (3,1) (2,3) (2,4)
(1,2,1) (3,2) (4,2)
(4,1) (5,1)
(1,3,1) (1,2,3)
(2,1,2) (1,3,2)
(1,4,1)
(2,1,3)
(2,3,1)
(3,1,2)
(3,2,1)
(1,1,2,2)
(1,2,1,2)
(2,1,2,1)
(2,2,1,1)
MATHEMATICA
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&, q, Length[#]>1&]]-1;
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], runsres[#]==2&]], {n, 10}]
PROG
(PARI) seq(n)={my(b=Vec(1/(1 - sum(k=1, n, x^k/(1+x^k) + O(x*x^n)))-1)); vector(n, k, sumdiv(k, d, b[d]-1))} \\ Andrew Howroyd, Dec 30 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 21 2019
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Dec 30 2020
STATUS
approved