A327406 Number of steps to reach a fixed point starting with n and repeatedly taking the quotient by the maximum divisor that is 1 or whose prime indices have a common divisor > 1 (A327405, A327656).
0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 0, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2
Offset: 1
Keywords
Examples
We have 5115 -> 165 -> 15 -> 3 -> 1, so a(5115) = 4.
Links
Crossrefs
Programs
-
Mathematica
Table[Length[FixedPointList[#/Max[Select[Divisors[#],GCD@@PrimePi/@First/@FactorInteger[#]!=1&]]&,n]]-2,{n,100}]
-
PARI
A327405(n) = (n / vecmax(select(d -> (1==d)||(gcd(apply(primepi,factor(d)[, 1]~))>1), divisors(n)))); A327406(n) = { my(u = A327405(n), k=0); while(u!=n, k++; n = u; u = A327405(n)); (k); }; \\ Antti Karttunen, Dec 06 2021
Extensions
Data section extended up to 105 terms by Antti Karttunen, Dec 06 2021
Comments