OFFSET
1,6
COMMENTS
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.
A prime index of n is a number m such that prime(m) divides n. The sequence of prime indices of n is row n of A112798.
LINKS
Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
EXAMPLE
We have (1,2,2,3) -> (1,2,1) -> (1,1,1) -> (3), so a(90) = 3.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&, q, Length[#]>1&]]-1;
Table[runsres[primeMS[n]], {n, 50}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 21 2019
STATUS
approved