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.

Showing 1-1 of 1 results.

A227420 Primes p such that p - pi(p) is also prime.

Original entry on oeis.org

5, 7, 13, 19, 29, 43, 53, 61, 107, 113, 181, 193, 229, 251, 317, 337, 383, 433, 463, 491, 601, 827, 857, 887, 997, 1033, 1061, 1163, 1193, 1307, 1373, 1531, 1693, 1699, 1721, 1789, 1811, 1831, 1931, 2003, 2029, 2267, 2339, 2347, 2383, 2411, 2423, 2531, 2579, 2617
Offset: 1

Views

Author

Zak Seidov, Sep 16 2013

Keywords

Comments

Note that pi(p) are all even, except for the first term. Differs from A101324.

Crossrefs

Programs

  • Maple
    5 = A000040(3) and 5 - 3 = 2 prime, 43 = A000040(14) and 43 - 14 = 29 prime.
  • Mathematica
    fQ[p_] := PrimeQ[p - PrimePi[p]]; Select[ Prime@ Range@ 400, fQ] (* Robert G. Wilson v, Dec 19 2014 *)
  • PARI
    is(n)=isprime(n) && isprime(n-primepi(n)) \\ Charles R Greathouse IV, Sep 16 2013
    
  • PARI
    v=primes(10^4); for(i=1,#v,if(isprime(v[i]-i),print1(v[i]", "))) \\ Charles R Greathouse IV, Sep 16 2013
Showing 1-1 of 1 results.