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.

A228828 Numbers n such that n^2 + pi(n) is prime.

Original entry on oeis.org

2, 3, 7, 12, 18, 21, 36, 37, 42, 45, 52, 55, 60, 61, 65, 68, 70, 79, 84, 95, 98, 113, 130, 135, 143, 145, 155, 180, 181, 185, 195, 205, 216, 222, 231, 239, 253, 262, 273, 275, 325, 332, 334, 354, 368, 370, 385, 402, 417, 421, 432, 433, 454, 462, 488, 505, 516
Offset: 1

Views

Author

K. D. Bajpai, Sep 04 2013

Keywords

Comments

Conjecture: the sequence is infinite.

Examples

			a(6) = 21 :  n^2+pi(n ) = 21^2 + pi(21) = 441+8 = 449 which is a prime.
		

Crossrefs

Cf. A077510 (numbers n such that n + pi(n) is a prime).

Programs

  • Maple
    with(numtheory): KD:= proc() local a;  a:= n^2+pi(n); if isprime(a) then RETURN(n): fi; end: seq(KD(), n=1..2000);
  • Mathematica
    Select[Range[600],PrimeQ[#^2+PrimePi[#]]&] (* Harvey P. Dale, Jul 04 2018 *)
  • PARI
    v=List(); p=0; for(n=2,1e4,p+=isprime(n); if(isprime(n^2+p), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Sep 04 2013