A326195 Number of iterations of x -> A009195(x) needed to reach 1 when starting from x = n, where A009195(x) = gcd(x, phi(x)).
0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 1, 4, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 2, 1, 5, 1, 2, 1, 4, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 5, 2, 3, 1, 3, 1, 4, 2, 4, 2, 2, 1, 3, 1, 2, 3, 6, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 2, 3, 1, 3, 1, 5, 4, 2, 1, 4, 1, 2, 1, 4, 1, 3, 1, 3, 2, 2, 1, 6, 1, 3, 2, 4, 1, 2, 1, 4, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Mathematica
Table[Length[NestWhileList[GCD[#,EulerPhi[#]]&,n,#>1&]]-1,{n,110}] (* Harvey P. Dale, Dec 21 2022 *)
-
PARI
A326195(n) = if(1==n,0,1+A326195(gcd(n,eulerphi(n))));