OFFSET
1,2
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
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
Select[Range[1100], And @@ PrimeQ /@ ({2, 4}*# + 1) &] (* Ray Chandler, Nov 20 2006 *)
PROG
(Magma) [n: n in [0..1100] |IsPrime(2*n+1) and IsPrime(4*n+1)]; // Vincenzo Librandi, Apr 17 2013
(PARI) is(k) = isprime(2*k+1) && isprime(4*k+1); \\ Jinyuan Wang, Aug 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Oct 31 2006
EXTENSIONS
Extended by Ray Chandler, Nov 20 2006
STATUS
approved