1,4

Table of n, a(n) for n=1..104.

Lei Zhou, Between 2^n and primes.

For prime(2)=3, 2^1+3 = 5 is prime

For prime(18)=61, 2^6-61 = 3 is prime

f[n_] := Block[{k = 0, p = Prime[n]}, While[ Not[(2^k - p > 1 && PrimeQ[2^k - p]) || PrimeQ[2^k + p]], k++ ]; k]; Table[ f[n], {n, 104}] (* Robert G. Wilson v, Jan 22 2005 *)

Cf. A102930, A102931, A094076, first occurrence in A103032.

Sequence in context: A028334 A083269 A097306 * A094076 A089611 A248470

Adjacent sequences: A102629 A102630 A102631 * A102633 A102634 A102635

nonn

Lei Zhou, Jan 20 2005

More terms from Robert G. Wilson v, Jan 21 2005

approved