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.

A257788 Numbers n such that n^3+prime(n) and n^3-prime(n) are prime.

Original entry on oeis.org

2, 66, 228, 696, 1416, 2172, 3000, 3384, 3732, 4314, 4524, 4554, 5070, 5220, 5412, 5826, 5844, 6636, 7422, 7662, 7932, 8148, 8832, 9528, 10092, 10242, 10746, 11670, 11682, 11820, 12918, 13266, 14430, 14580, 15216, 15300, 15534, 15864, 16542, 16782, 16932, 17670
Offset: 1

Views

Author

K. D. Bajpai, May 12 2015

Keywords

Comments

All terms are even.

Examples

			2 is in the sequence: 2^3 + prime(2) = 11; 2^3 - prime(2) = 5; both are prime.
66 is in the sequence: 66^3 + prime(66) = 287813; 66^3 - prime(66) = 287179; both are prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..20000] | IsPrime(n^3+NthPrime(n)) and IsPrime(n^3-NthPrime(n))];
  • Mathematica
    Select[Range[30000], PrimeQ[#^3 + Prime[#]] && PrimeQ[#^3 - Prime[#]] &]
    Select[Range[18000],AllTrue[#^3+{Prime[#],-Prime[#]},PrimeQ]&] (* Harvey P. Dale, Aug 10 2023 *)
  • PARI
    for(n=1, 1e5, if(isprime(n^3 + prime(n)) && isprime(n^3 - prime(n)), print1(n,", ")))
    

Formula

Intersection of A141526 and A212881.