OFFSET
1,6
COMMENTS
LINKS
EXAMPLE
We have 798 -> 42 -> 6 -> 2 -> 1, so a(798) = 4.
MATHEMATICA
stableQ[u_, Q_]:=!Apply[Or, Outer[#1=!=#2&&Q[#1, #2]&, u, u, 1], {0, 1}];
Table[Length[FixedPointList[#/Max[Select[Divisors[#], stableQ[PrimePi/@First/@FactorInteger[#], Divisible]&]]&, n]]-2, {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 15 2019
STATUS
approved