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.
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
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