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!)
A334686 Start with n, and successively apply phi, phi, sigma', phi, phi, sigma', phi, ... until reaching either 0 or 1; a(n) is the number of steps needed (phi = A000010, sigma' = A001065); or a(n) = -1 if 0 or 1 is never reached. 5
0, 1, 2, 2, 3, 2, 3, 3, 3, 3, 5, 3, 5, 3, 5, 5, 6, 3, 5, 5, 5, 5, 6, 5, 6, 5, 5, 5, 8, 5, 6, 6, 6, 6, 6, 5, 8, 5, 6, 6, 8, 5, 8, 6, 6, 6, 6, 6, 8, 6, 8, 6, 8, 5, 8, 6, 8, 8, 8, 6, 8, 6, 8, 8, 8, 6, 8, 8, 8, 6, 8, 6, 8, 8, 8, 8, 8, 6, 8, 8, 8, 8, 9, 6, 9, 8, 8, 8, 9, 6, 8, 8, 8, 6, 8, 8, 9, 8, 8, 8, 9, 8, 9, 8, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Created following a suggestion from R. J. Mathar in an attempt to understand A032452.
LINKS
L. Alaoglu and P. Erdős, A conjecture in elementary number theory, Bull. Amer. Math. Soc. 50 (1944), 881-882.
EXAMPLE
The trajectory of n=7 is 7, 6, 2, 1, ... which takes three steps to reach 0 or 1, so a(7) = 3.
MATHEMATICA
A334686[n_]:=Module[{i=0}, NestWhile[If[Mod[i++, 3]==2, DivisorSigma[1, #]-#, EulerPhi[#]]&, n, #>1&]; i]; Array[A334686, 100] (* Paolo Xausa, Nov 16 2023 *)
PROG
(PARI) a(n) = { for (k=0, oo, if (n<=1, return (k), k%3==2, n=sigma(n)-n, n=eulerphi(n))) } \\ Rémy Sigrist, May 09 2020
CROSSREFS
Sequence in context: A076223 A076235 A268058 * A057941 A358550 A126071
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 08 2020
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 April 24 13:30 EDT 2024. Contains 371957 sequences. (Running on oeis4.)