OFFSET
1,1
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
Brian Hopkins, Euler's Enumerations, Enumerative Combinatorics and Applications (2021) Vol. 1, No. 1, Article #S1H1.
EXAMPLE
37 is in the sequence because it is adjacent to two pairs of twins (29,31 and 41,43). 47 is not because the primes adjacent to it are 43 and 53 and although 43 is a twin, 53 is not.
MATHEMATICA
PrimeNext[n_]:=Module[{k}, k=n+1; While[ !PrimeQ[k], k++ ]; k]; PrimePrev[n_]:=Module[{k}, k=n-1; While[ !PrimeQ[k], k-- ]; k]; lst={}; Do[p=Prime[n]; If[ !PrimeQ[p-2]&&PrimeQ[PrimePrev[p]-2]&&!PrimeQ[p+2]&&PrimeQ[PrimeNext[p]+2], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jul 22 2009 *)
m = 2000; #[[3]] & /@ Select[Partition[Prime[Range[7, m]], 5, 1], #[[2]] - #[[1]] == #[[5]] - #[[4]] == 2 &] (* Zak Seidov, Nov 25 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Neil Fernandez, Mar 22 2002
EXTENSIONS
More terms from Vladimir Joseph Stephan Orlovsky, Dec 04 2009
STATUS
approved