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.

A123998 Numbers k such that 2k+1 and 4k+1 are primes.

Original entry on oeis.org

1, 3, 9, 15, 18, 39, 48, 69, 78, 99, 105, 114, 135, 153, 165, 168, 183, 189, 219, 249, 273, 288, 300, 303, 309, 330, 345, 363, 405, 414, 438, 468, 483, 498, 504, 534, 585, 618, 639, 648, 699, 714, 729, 765, 804, 813, 828, 879, 933, 1005, 1014, 1044, 1065, 1068
Offset: 1

Views

Author

Artur Jasinski, Oct 31 2006

Keywords

Comments

Note that if n == 1 (mod 3) then 2n+1 is not prime (except n=1); and if n == 2 (mod 3) then 4n+1 is not prime. Therefore n must be a multiple of 3, except for n=1. - Max Alekseyev, Nov 02 2006

Crossrefs

Programs

  • Magma
    [n: n in [0..1100] |IsPrime(2*n+1) and IsPrime(4*n+1)]; // Vincenzo Librandi, Apr 17 2013
    
  • Mathematica
    Select[Range[1100], And @@ PrimeQ /@ ({2, 4}*# + 1) &] (* Ray Chandler, Nov 20 2006 *)
  • PARI
    is(k) = isprime(2*k+1) && isprime(4*k+1); \\ Jinyuan Wang, Aug 04 2019

Extensions

Extended by Ray Chandler, Nov 20 2006