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.

A164042 Primes p such that 2*p^2+4*p+1 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 17, 23, 37, 41, 61, 79, 97, 101, 107, 131, 139, 157, 163, 191, 199, 227, 241, 269, 293, 311, 331, 373, 383, 401, 409, 439, 443, 457, 467, 541, 569, 601, 607, 619, 653, 709, 719, 773, 839, 853, 881, 929, 947, 983, 1031, 1063, 1087, 1097, 1109, 1153, 1231, 1249
Offset: 1

Views

Author

Vincenzo Librandi, Aug 08 2009

Keywords

Comments

If a(k) is of the form 3ยท2^(h-1)-1 and 2*a(k)+1 is prime, then 2^h*a(k)*(2*a(k)+1) and 2^h*(2*a(k)^2+4*a(k)+1) are a pair of amicable numbers. - Vincenzo Librandi, Jun 09 2014

Crossrefs

Cf. A164041.

Programs

  • Magma
    [p: p in PrimesUpTo(1500) | IsPrime(2*p^2+4*p+1)]; // Vincenzo Librandi, Apr 08 2013
  • Mathematica
    lst={}; Do[p=Prime@n; a=2*p^2+4*p+1; If[PrimeQ@a,AppendTo[lst,p]],{n,7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)
    Select[Range[2000], PrimeQ[#]&&PrimeQ[2 #^2 + 4 # + 1]&] (* Vincenzo Librandi, Apr 08 2013 *)
    Select[Prime[Range[250]],PrimeQ[2#^2+4#+1]&] (* Harvey P. Dale, Sep 06 2022 *)

Extensions

Extended by R. J. Mathar, Aug 11 2009