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.

A224872 Numbers k such that prime(k)*pi(k)+1 is prime.

Original entry on oeis.org

3, 15, 20, 29, 58, 63, 80, 90, 92, 93, 96, 116, 125, 126, 143, 151, 155, 156, 164, 182, 185, 189, 210, 230, 251, 255, 256, 268, 274, 275, 294, 298, 319, 323, 324, 325, 328, 330, 343, 360, 362, 399, 400, 416, 425, 429, 437, 446, 457, 463, 466, 480, 497, 505, 506
Offset: 1

Views

Author

K. D. Bajpai, Jul 23 2013

Keywords

Examples

			Prime(126)*pi(126)+1 = 701*30+1 = 21031 which is prime, hence 126 is in the sequence.
		

Crossrefs

Cf. A065042.

Programs

  • Maple
    A224872:=proc(n) local a; a:=(ithprime(n)*numtheory[pi](n)+1) ; if isprime(a) then RETURN(n) end if:end proc: seq(A224872(n),n=1..600);
  • Mathematica
    Select[Range[2000],PrimeQ[Prime[#]*PrimePi[#]+1]&]
  • PARI
    n=0;forprime(p=2,1e5,if(isprime(p*primepi(n++)+1), print1(n", "))) \\ Charles R Greathouse IV, Jul 23 2013