A060607 Number of iterations of phi(x) at prime(n) needed to reach 1.
1, 2, 3, 3, 4, 4, 5, 4, 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 6, 7, 6, 7, 8, 7, 7, 7, 7, 6, 8, 7, 8, 7, 7, 8, 7, 7, 7, 7, 8, 7, 8, 8, 8, 8, 9, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 8, 8, 7, 8, 9, 8, 9, 9, 8, 8, 8, 8, 8, 9, 9, 8, 9, 8, 9, 9, 7, 8, 9, 9, 8, 9, 8, 8, 8, 9, 9, 9, 8
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Array[-1 + Length@ NestWhileList[EulerPhi, Prime@ #, # > 1 &] &, 105] (* Michael De Vlieger, Mar 27 2019 *)
-
PARI
a(n) = my(t=0, p=prime(n)); while(p>1, t++; p=eulerphi(p)); t; \\ Michel Marcus, Mar 27 2019
Formula
Extensions
Name edited by Michel Marcus, Mar 27 2019
Comments