OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
6*2-1=11 6*2+1=13 11 13 twin primes as 17 and 19 so 1 is first term of the sequence
6*3-1=17 6*3+1=19 17 19 twin primes as 29 and 31 so 2 is second term of the sequence
6*5-1=29 6*5+1=31 29 and 31 twin primes 5=3rd prime
6*7-1=41 6*7+1=43 41 and 43 twin primes 7=4th prime so 3 is the 3rd term of the sequence
MATHEMATICA
Select[Range[39000], PrimeQ[6*Prime[ # ] - 1] && PrimeQ[6*Prime[ # ] + 1] && PrimeQ[6*Prime[ # + 1] - 1] && PrimeQ[6*Prime[ # + 1] + 1] &] (* Ray Chandler, Feb 11 2007 *)
Select[Range[40000], AllTrue[Flatten[{6*Prime[#]+{1, -1}, 6*Prime[#+1]+{1, -1}}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 27 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 09 2007
EXTENSIONS
Corrected and extended by Ray Chandler, Feb 11 2007
STATUS
approved