OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Wikipedia, Sexy prime
EXAMPLE
The table starts:
7, 13, 19;
17, 23, 29;
31, 37, 43;
...
MAPLE
N:= 10^4: # to get all entries <= N
Primes:= select(isprime, {seq(i, i=1..N+18, 2)}):
S:= select(`<=`, Primes, N) intersect map(t -> t-6, Primes) intersect map(t -> t-12, Primes) minus map(t -> t-18, Primes):
map(t ->(t, t+6, t+12), sort(convert(S, list))); # Robert Israel, Aug 05 2016
MATHEMATICA
Most[#]&/@Select[Table[n+{0, 6, 12, 18}, {n, Prime[Range[200]]}], PrimeQ[#] == {True, True, True, False}&]//Flatten (* Harvey P. Dale, Jan 19 2017 *)
PROG
(Magma) lst:=[]; for p in PrimesUpTo(727) do b:=p+6; if IsPrime(b) then c:=b+6; if IsPrime(c) and not IsPrime(c+6) then lst:=lst cat [p, b, c]; end if; end if; end for; lst;
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Arkadiusz Wesolowski, Aug 05 2016
STATUS
approved