OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Prime Triplet.
FORMULA
MAPLE
for a from 3 by 2 to 10000 do
if `and`(isprime(a), isprime(a+6), isprime(a+8)) then print(a); end if;
end do; # Matt C. Anderson, Jul 24 2015
MATHEMATICA
Select[Range@ 6000, AllTrue[{#, # + 6, # + 8}, PrimeQ] &] (* Michael De Vlieger, Jul 24 2015, Version 10 *)
Select[Prime[Range[1000]], AllTrue[#+{6, 8}, PrimeQ]&] (* Harvey P. Dale, Jun 05 2024 *)
PROG
(Magma) [p: p in PrimesUpTo(10^4)| IsPrime(p+6) and IsPrime(p+8)]; // Vincenzo Librandi, Jul 26 2015
(Perl) use ntheory ":all"; say for sieve_prime_cluster(0, 1e5, 6, 8); # Dana Jacobsen, Oct 17 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved