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.

A070162 Numbers k such that k - phi(k) - 1 is a prime.

Original entry on oeis.org

6, 8, 9, 10, 12, 14, 16, 18, 20, 22, 26, 34, 36, 38, 40, 42, 44, 46, 48, 50, 56, 58, 60, 62, 64, 72, 74, 78, 80, 82, 84, 86, 88, 92, 94, 100, 106, 108, 116, 118, 122, 126, 134, 136, 142, 146, 150, 152, 156, 158, 162, 164, 166, 178, 180, 182, 192, 194, 198, 202, 204
Offset: 1

Views

Author

Labos Elemer, Apr 26 2002

Keywords

Comments

Maximal solution is either k = 2p or, in the case of Mersenne primes M, k = 2(M+1) and f(k) = p or f(k) = M.

Examples

			k = 192: phi(192) = 64, cototient(192) = 128, k - phi(192) - 1 = 127 is prime.
k = 2p: 2p - phi(2p) - 1 = 2p - p + 1 - 1 = p, so 2*prime is always a solution.
k = 2^(q+1), where q is a Mersenne prime exponent: cototient(k) - 1 = 2^(p+1) - 2^p - 1 = 2^p - 1, which is the corresponding Mersenne prime.
Numbers k in {192, 224, 248, 254, 256} give p = 127.
numbers k in {72, 80, 88, 92, 94} give p = 47.
		

Crossrefs

Programs

  • Mathematica
    Do[s=n-EulerPhi[n]-1; If[PrimeQ[s], Print[n, s]], n, 1, 10000]
    Select[Range[250],PrimeQ[#-EulerPhi[#]-1]&] (* Harvey P. Dale, Sep 05 2023 *)
  • PARI
    is(k) = isprime(k - eulerphi(k) - 1); \\ Amiram Eldar, Nov 07 2024

Formula

f(k) = k - A000010(k) - 1 = A051953(k) - 1 is prime.