OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 31 is a term because 31 is prime, the next prime is 37, and 31 + 4 * 37 = 179 is prime.
MAPLE
filter:= proc(p) local q;
if not isprime(p) then return false fi;
q:= nextprime(p);
isprime(p+4*q)
end proc:
select(filter, [seq(i, i=3..10000, 2)]);
MATHEMATICA
f[p_] := Module[{q}, If[!PrimeQ[p], Return[False]]; q = NextPrime[p]; PrimeQ[p + 4*q]]; Select[Range[3, 3511, 2], f] (* James C. McMahon, Jan 03 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert Israel, Jan 03 2024
STATUS
approved