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.

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

This page as a plain text file.
%I A227420 #33 Sep 07 2022 20:35:48
%S A227420 5,7,13,19,29,43,53,61,107,113,181,193,229,251,317,337,383,433,463,
%T A227420 491,601,827,857,887,997,1033,1061,1163,1193,1307,1373,1531,1693,1699,
%U A227420 1721,1789,1811,1831,1931,2003,2029,2267,2339,2347,2383,2411,2423,2531,2579,2617
%N A227420 Primes p such that p - pi(p) is also prime.
%C A227420 Note that pi(p) are all even, except for the first term. Differs from A101324.
%H A227420 Charles R Greathouse IV, <a href="/A227420/b227420.txt">Table of n, a(n) for n = 1..10000</a>
%p A227420 5 = A000040(3) and 5 - 3 = 2 prime, 43 = A000040(14) and 43 - 14 = 29 prime.
%t A227420 fQ[p_] := PrimeQ[p - PrimePi[p]]; Select[ Prime@ Range@ 400, fQ] (* _Robert G. Wilson v_, Dec 19 2014 *)
%o A227420 (PARI) is(n)=isprime(n) && isprime(n-primepi(n)) \\ _Charles R Greathouse IV_, Sep 16 2013
%o A227420 (PARI) v=primes(10^4); for(i=1,#v,if(isprime(v[i]-i),print1(v[i]", "))) \\ _Charles R Greathouse IV_, Sep 16 2013
%Y A227420 Cf. A000040, A000720, A061067, A101324.
%K A227420 nonn
%O A227420 1,1
%A A227420 _Zak Seidov_, Sep 16 2013