The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A362024 The number of iterations of the infinitary totient function iphi (A064380) required to reach from n to 1. 2
1, 2, 3, 4, 3, 4, 4, 5, 5, 6, 5, 6, 5, 6, 7, 8, 7, 8, 7, 6, 6, 7, 6, 7, 8, 8, 9, 10, 7, 8, 8, 7, 7, 8, 9, 10, 7, 9, 8, 9, 9, 10, 9, 8, 11, 12, 8, 9, 9, 10, 10, 11, 7, 10, 9, 9, 11, 12, 8, 9, 9, 10, 9, 10, 8, 9, 11, 10, 9, 10, 8, 9, 9, 8, 10, 10, 10, 11, 11, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
FORMULA
a(n) = a(A064380(n)) + 1 for n > 2.
EXAMPLE
a(6) = 3 since there are 3 iterations from 6 to 1: iphi(6) = 3, iphi(3) = 2 and iphi(2) = 1.
MATHEMATICA
infCoprimeQ[n1_, n2_] := Module[{g = GCD[n1, n2]}, If[g == 1, True, AllTrue[FactorInteger[g][[;; , 1]], BitAnd @@ IntegerExponent[{n1, n2}, #] == 0 &]]];
iphi[n_] := Sum[Boole[infCoprimeQ[j, n]], {j, 1, n - 1}];
a[n_] := Length@ NestWhileList[iphi, n, # > 1 &] - 1;
Array[a, 100, 2]
PROG
(PARI) isinfcoprime(n1, n2) = {my(g = gcd(n1, n2), p, e1, e2); if(g == 1, return(1)); p = factor(g)[, 1]; for(i=1, #p, e1 = valuation(n1, p[i]); e2 = valuation(n2, p[i]); if(bitand(e1, e2) > 0, return(0))); 1; }
iphi(n) = sum(j = 1, n-1, isinfcoprime(j, n));
a(n) = if(n==2, 1, a(iphi(n)) + 1);
CROSSREFS
Cf. A064380, A362025 (indices of records).
Similar sequences: A003434, A049865, A333609.
Sequence in context: A059572 A031249 A031232 * A030583 A030563 A081399
KEYWORD
nonn
AUTHOR
Amiram Eldar, Apr 05 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 10 10:03 EDT 2024. Contains 373264 sequences. (Running on oeis4.)