OFFSET
2,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
FORMULA
MATHEMATICA
snm[n_]:=Module[{m=1}, While[!PrimeQ[2n-m]||!PrimeQ[2n+m], m=m+2]; m]; Array[ snm, 90, 2] (* Harvey P. Dale, Aug 13 2017, optimized by Ivan N. Ianakiev, Mar 16 2018 *)
PROG
(Haskell)
a264526 = head . a260689_row
(PARI) a(n) = {my(m=1); while(!(isprime(2*n-m) && isprime(2*n+m)), m+=2); m; } \\ Michel Marcus, Mar 18 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 17 2015
STATUS
approved