OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(2) = 137 is a term because 137 and 139 are twin primes, 6*137-1 = 821 and 6*137+1 = 823 are twin primes, and (137+1)/6 = 23 is a prime.
MAPLE
P:= select(isprime, {seq(i, i=5..2*10^7, 2)}):
T:= P intersect map(`-`, P, 2):
R:=T intersect map(t -> (t+1)/6, T):
sort(convert(select(t -> isprime((t+1)/6), R), list));
MATHEMATICA
Select[Prime[Range[180000]], PrimeQ[# + 2] && PrimeQ[6*# - 1] && PrimeQ[6*# + 1] && PrimeQ[(# + 1)/6] &] (* Amiram Eldar, Nov 03 2022 *)
Select[Prime[Range[180000]], AllTrue[{#+2, 6#+1, 6#-1, (#+1)/6}, PrimeQ]&] (* Harvey P. Dale, Jan 29 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 03 2022
STATUS
approved