OFFSET
0,2
MATHEMATICA
f[n_] := Block[{k = 0, p = Prime[n]}, While[ Not[(2^k - p > 1 && PrimeQ[2^k - p]) || PrimeQ[2^k + p]], k++ ]; k]; t = Table[ f[n], {n, 10^4}]; Table[ Position[t, n][[1, 1]], {n, 0, 48}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Lei Zhou and Robert G. Wilson v, Jan 22 2005
STATUS
approved