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.
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
Offset: 1
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.
Programs
-
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
Formula
a(n) = 0 iff n is in A000961. - M. F. Hasler, Sep 03 2017
Extensions
Initial terms corrected and more terms from M. F. Hasler, Sep 03 2017
Comments