login
A227420
Primes p such that p - pi(p) is also prime.
3
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,1
COMMENTS
Note that pi(p) are all even, except for the first term. Differs from A101324.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 16 2013
STATUS
approved