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.

A072281 Numbers n such that phi(n) + 1 and phi(n) - 1 are twin primes.

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 18, 19, 21, 26, 27, 28, 31, 36, 38, 42, 43, 49, 54, 61, 62, 73, 77, 86, 91, 93, 95, 98, 99, 103, 109, 111, 117, 122, 124, 133, 135, 139, 146, 148, 151, 152, 154, 171, 181, 182, 186, 189, 190, 193, 198, 199, 206, 209, 216, 217, 218, 221, 222
Offset: 1

Views

Author

Joseph L. Pe, Jul 10 2002

Keywords

Comments

Phi(n) is middle term between twin primes (A014574). Union of A006512 and A068019; intersection of A039698 and A078892. - Ray Chandler, May 26 2008
The positions of isolated nonprimes in A000010. - Juri-Stepan Gerasimov, Nov 10 2009

Examples

			phi(14) + 1 = 7 and phi(14) - 1 = 5, so 14 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^3], PrimeQ[EulerPhi[ # ] + 1] && PrimeQ[EulerPhi[ # ] - 1] &]
    Select[Range[300],And@@PrimeQ[EulerPhi[#]+{1,-1}]&] (* Harvey P. Dale, Apr 07 2012 *)
  • PARI
    isok(n) = my(p); isprime(p=eulerphi(n)-1) && isprime(p+2); \\ Michel Marcus, Sep 29 2019

Extensions

Extended by Ray Chandler, May 26 2008