OFFSET
1,1
FORMULA
EXAMPLE
For n = 3: list = {30,22,12,8,4,2,1,0}, a(4) = 8.
MATHEMATICA
g[x_] := x - EulerPhi[x]; f[x_] := Length[ FixedPointList[g, x]] - 1; q[x_] := Product[ Prime[j], {j, x}]; Table[ f[ q[n]], {n, 33}]
a[n_] := Length@ NestWhileList[(# - EulerPhi[#])&, Times @@ Prime[Range[n]], # > 0 &]; Array[a, 30] (* Amiram Eldar, Nov 19 2024 *)
PROG
(PARI) a(n) = {my(p = prod(i=1, n, prime(i)), c = 1); while(p > 0, c++; p -= eulerphi(p)); c; } \\ Amiram Eldar, Nov 19 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Labos Elemer, Sep 22 2004
EXTENSIONS
More terms from Robert G. Wilson v, Sep 22 2004
a(37)-a(54) from Amiram Eldar, Nov 19 2024
STATUS
approved