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!)
A291786 a(n) = number of iterations of k -> (psi(k)+phi(k))/2 (A291784) needed to reach a prime or a power of a prime or 1, or -1 if that doesn't happen. 5
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0, 2, 1, 0, 0, 3, 0, 2, 2, 1, 0, 6, 0, 1, 0, 5, 0, 4, 0, 0, 9, 8, 7, 6, 0, 5, 4, 3, 0, 5, 0, 2, -1, 1, 0, -1, 0, -1, 6, 5, 0, 4, -1, -1, 2, 1, 0, -1, 0, 4, 3, 0, 3, 2, 0, -1, -1, -1, 0, -1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,12
COMMENTS
Primes and prime powers are fixed points under the map f(k) = (psi(k)+phi(k))/2, so in that case we take a(n)=0. (If n = p^k, then psi(n) = p^k(1+1/p), phi(n) = p^k(1-1/p), and their average is p^k, so n is a fixed point under the map.)
Since f(n)>n if n is not a prime power, there can be no nontrivial cycles.
Wall (1985) observes that the trajectories of 45 and 50 are unbounded, so a(45) = a(50) = -1. See A291787, A291788.
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 147.
LINKS
C. R. Wall, Unbounded sequences of Euler-Dedekind means, Amer. Math. Monthly, 92 (1985), 587.
FORMULA
a(n) = 0 iff n is in A000961. - M. F. Hasler, Sep 03 2017
PROG
(PARI) A291786(n, L=n)=n>1&&for(i=0, L, isprimepower(n)&&return(i); n=A291784(n)); -(n>1) \\ The suggested search limit L=n is only empirical and might require revision. The code also currently assumes that the prime powers are the only cycles. - M. F. Hasler, Sep 03 2017
CROSSREFS
Sequence in context: A072780 A124452 A351532 * A004603 A174951 A275326
KEYWORD
sign,more
AUTHOR
N. J. A. Sloane, Sep 02 2017
EXTENSIONS
Initial terms corrected and more terms from M. F. Hasler, Sep 03 2017
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 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)