login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Rémy Sigrist, Table of n, a(n) for n = 1..25000

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

Cf. A000010, A000203, A032452, A334686, A334523, A334725.

Sequence in context: A171889 A171868 A292146 * A340694 A101910 A162784

Adjacent sequences:  A334682 A334683 A334684 * A334686 A334687 A334688

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 12:47 EDT 2021. Contains 346273 sequences. (Running on oeis4.)