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!)
A334685 Start with n, and successively apply phi, phi, sigma, phi, phi, sigma, phi, ... until reaching 1; a(n) is the number of steps needed (phi = A000010, sigma = A000203); or a(n) = -1 if 1 is never reached. 5
0, 1, 2, 2, 5, 2, 5, 5, 5, 5, 8, 5, 8, 5, 8, 8, 11, 5, 8, 8, 8, 8, 8, 8, 11, 8, 8, 8, 11, 8, 11, 11, 11, 11, 11, 8, 11, 8, 11, 11, 14, 8, 11, 11, 11, 8, 11, 11, 11, 11, 14, 11, 14, 8, 14, 11, 11, 11, 14, 11, 14, 11, 11, 14, 14, 11, 11, 14, 11, 11, 14, 11, 14, 11, 14, 11, 14, 11, 14, 14, 14, 14, 14, 11, 14, 11, 14, 14 (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=11 is 11, 10, 4, 7, 6, 2, 3, 2, 1, 1, 1, ..., which takes eight steps to reach 1, so a(11) = 8.
MATHEMATICA
Array[-1 + Length@ NestWhile[Append[#1, If[#2 == 0, DivisorSigma[1, #1[[-1]]], EulerPhi@ #1[[-1]] ]] & @@ {#, Mod[Length@ #, 3]} &, {#}, Last[#] > 1 &] &, 80] (* Michael De Vlieger, May 09 2020 *)
PROG
(PARI) a(n) = { for (k=0, oo, if (n==1, return (k), k%3==2, n=sigma(n), n=eulerphi(n))) } \\ Rémy Sigrist, May 09 2020
CROSSREFS
Sequence in context: A171889 A171868 A292146 * A340694 A101910 A162784
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 20 00:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)