OFFSET
1,2
MATHEMATICA
ind[v_, e_] := If[Length[(p = Position[v, _?(# == e &)])] == 0, -1, p[[1]]]; tpmidQ[n_] := And @@ PrimeQ[n + {-1, 1}]; tp = Select[Range[10^4], tpmidQ]; d = Differences[tp]; ind[tp, #] & /@ d // Flatten (* Amiram Eldar, Jul 12 2019 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Dmitry Kamenetsky, Jul 10 2019
STATUS
approved