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.

A242979 Primes p such that p^3-2 and p^2-2 are both primes.

Original entry on oeis.org

19, 37, 211, 727, 2287, 4507, 4951, 5857, 6217, 6337, 7237, 8329, 8629, 8941, 9127, 9319, 9721, 11467, 12109, 13411, 13831, 15331, 15661, 17029, 17971, 17989, 19489, 21169, 23431, 24439, 24907, 25849, 26161, 31387, 33151, 34039, 34897, 36451, 37441, 37879
Offset: 1

Views

Author

K. D. Bajpai, May 28 2014

Keywords

Comments

Intersection of A062326 and A178251.

Examples

			19 is prime and appears in the sequence because [19^3-2 = 6857] and [19^2-2 = 359] are both primes.
37 is prime and appears in the sequence because [37^3-2 = 50651] and [37^2-2 = 1367] are both primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory):A242979:= proc() local p; p:=ithprime(n); if isprime(p^3-2) and isprime(p^2-2)then RETURN (p); fi; end: seq( A242979 (), n=1..5000);
  • Mathematica
    c = 0; t=Prime[n]; Do[If[PrimeQ[t^3 - 2] && PrimeQ[t^2 - 2], c++; Print[c,"  ",t]], {n,1,3*10^6}];