OFFSET
0,1
COMMENTS
For n=0 we just take a(0)=2, the least prime >= 2^0, as there is no prime <= 2^0. - Robert Israel, Nov 01 2018
LINKS
Robert Israel, Table of n, a(n) for n = 0..3317
FORMULA
MAPLE
[2, seq( (nextprime(2^x-1)+prevprime(2^x+1)), x=1..20)]; # Corrected by Robert Israel, Nov 01 2018
MATHEMATICA
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Table[PrevPrim[2^n+1] + NextPrim[2^n-1], {n, 31}] (* Robert G. Wilson v, Apr 14 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jorge Coveiro, Apr 05 2004
EXTENSIONS
More terms from Robert G. Wilson v, Apr 14 2004
STATUS
approved