A327403 Number of steps to reach a fixed point starting with n and repeatedly taking the quotient by the maximum stable divisor (A327393, A327402).
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2
Offset: 1
Keywords
Examples
We have 798 -> 42 -> 6 -> 2 -> 1, so a(798) = 4.
Links
Crossrefs
Programs
-
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}]
-
PARI
A327403(n) = for(k=0,oo,my(nextn=A327402(n)); if(nextn==n,return(k)); n = nextn); \\ Antti Karttunen, Jan 28 2025
Extensions
Data section extended to a(105) by Antti Karttunen, Jan 28 2025
Comments