OFFSET
2,1
EXAMPLE
a(4) = 462 because 462 = 2*3*7*11 and the twin primes are 461 and 463.
MATHEMATICA
Generate[pIndex_, i_] := Module[{p2, t}, p2=pIndex; While[p2[[i]]++; Do[p2[[j]]=p2[[i]]+j-i, {j, i+1, Length[p2]}]; t=Times@@Prime[p2]; t<fact*base, AppendTo[s, t]; If[i<Length[p2], Generate[p2, i+1]]]]; fact=3; Table[pin=Range[n]; base=Times@@Prime[pin]; s={base}; Do[Generate[pin, j], {j, n}]; s=Sort[s]; noPrime=True; i=0; While[noPrime&&i<Length[s], i++; noPrime=!(PrimeQ[ -1+s[[i]]] && PrimeQ[1+s[[i]]])]; If[noPrime, -1, s[[i]]], {n, 2, 20}] (T. D. Noe)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 26 2002
EXTENSIONS
More terms from T. D. Noe, Dec 13 2004
STATUS
approved