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.

A126960 Primes p such that (3p)^2 + 2 is prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 37, 41, 73, 79, 83, 101, 103, 107, 139, 149, 151, 167, 191, 227, 233, 251, 269, 311, 337, 443, 457, 479, 499, 503, 521, 541, 601, 613, 647, 673, 761, 811, 829, 863, 877, 883, 887, 907, 919, 941, 983, 997
Offset: 1

Views

Author

Cino Hilliard, Mar 19 2007

Keywords

Comments

A generalization of this would be primes p such that (kp)^2+2 is prime. Then k=3 is the only solution. This follows from the fact that k of the form 3m-1 or 3m+1 will give 9m^2 + 6m + 1 + 2, a multiple of 3.

References

  • Garath A. Jones and Mary Jones, Elementary Number Theory, Springer - Verlag London, 1998; p. 35, Exercise 2.17.

Programs

  • Magma
    [ p: p in PrimesUpTo(1000) | IsPrime((3*p)^2+2)] // Vincenzo Librandi, Jan 29 2011
  • Mathematica
    lst={}; Do[p=Prime@n; If[PrimeQ@((3*p)^2+2),AppendTo[lst,p]],{n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 11 2009 *)
  • PARI
    g(n) = forprime(x=0,n,y=9*x^2+2;if(isprime(y),print1(x",")))
    

Extensions

Entries confirmed by Zak Seidov, Mar 19 2007