A098115 a(n) is the length of iteration trajectory when the cototient function (A051953) is applied to the half of the n-th primorial number (A070826(n) = A002110(n)/2).
2, 3, 4, 7, 10, 5, 12, 15, 12, 28, 6, 6, 31, 12, 47, 29, 23, 32, 33, 24, 40, 28, 12, 35, 34, 56, 17, 36, 40, 123, 57, 61, 9, 99, 94, 132, 158, 172, 23, 43, 89, 186, 196, 194, 203, 157, 205, 62, 32, 26, 76, 105, 65, 45, 177, 56, 278
Offset: 1
Examples
For n = 7: list = {255255,163095,77815,16663,895,183,63,27,9,3,1,0}, a(7) = 12, while the comparable length for 510510 is A098202(7) = 43.
Programs
-
Mathematica
g[x_] :=x-EulerPhi[x]; f[x_] :=Length[FixedPointList[g, x]]-1; q[x_] :=Apply[Times, Table[Prime[j], {j, 1, x}]]; t=Table[f[q[w]/2], {w, 1, 37}] a[n_] := Length@ NestWhileList[(# - EulerPhi[#])&, Times @@ Prime[Range[2, n]], # > 0 &]; Array[a, 30] (* Amiram Eldar, Nov 19 2024 *)
-
PARI
a(n) = {my(p = prod(i=2, n, prime(i)), c = 1); while(p > 0, c++; p -= eulerphi(p)); c;} \\ Amiram Eldar, Nov 19 2024
Extensions
a(38)-a(57) from Amiram Eldar, Nov 19 2024
Comments