cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A291785 Iterate the map A291784: k -> (psi(k)+phi(k))/2, starting with n, until a power of a prime (A000961) is reached, or -1 if that never happens.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 11, 16, 13, 16, 16, 16, 17, 23, 19, 23, 23, 23, 23, 47, 25, 27, 27, 47, 29, 47, 31, 32, 83, 83, 83, 83, 37, 47, 47, 47, 41, 83, 43, 47, -1, 47, 47, -1, 49, -1, 83, 83, 53, 83, -1, -1, 59, 59, 59, -1, 61, 83, 83, 64, 83, 83, 67, -1, -1, -1, 71, -1, 73
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2017

Keywords

Comments

Primes and prime powers are fixed points under the map f(k) = (psi(k)+phi(k))/2. (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.
Also 48 and many more terms seem to have unbounded trajectories. - Hugo Pfoertner, Sep 03 2017.
Obviously any number in the trajectory of a number with unbounded trajectory (in particular that of 45, A291787) again has this property. A291788 is the union of all these. - M. F. Hasler, Sep 03 2017

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 147.

Crossrefs

Programs

  • PARI
    A291785(n,L=n)={for(i=0,L,isprimepower(n=A291784(n))&&return(n));(-1)^(n>1)} \\ The search limit L=n is only experimental but appears quite conservative w.r.t. known data, cf. A291786. The algorithm assumes that there are no cycles except for the powers of primes. - M. F. Hasler, Sep 03 2017

Extensions

More terms from Hugo Pfoertner, Sep 03 2017