OFFSET
1,3
COMMENTS
Essentially the same as A013597. - T. D. Noe, Jul 17 2007
From Jianing Song, May 28 2024: (Start)
Not every odd number is present, as no term can be equal to a Sierpiński number (for example 78557); cf. A076336. See also A067760.
Conjecture: Every odd number which is not a Sierpiński number is a term. In other words, for every odd k which is not a Sierpiński number, there exists some n >= 1 such that 2^n + 1, 2^n + 3, ..., 2^n + (k-2) are all composite while 2^n + k is prime. (End)
LINKS
T. D. Noe, Table of n, a(n) for n=1..5000
FORMULA
a(n) = nextprime(2^n) - 2^n.
EXAMPLE
a(13)=17 because 2^13=8192 and the next prime is 8209=8192+17.
MATHEMATICA
Join[{0}, NextPrime[#]-#&/@(2^Range[2, 80])] (* Harvey P. Dale, Jun 06 2012 *)
PROG
(PARI) for(i=1, 100, x=2^i; print1(nextprime(x)-x, ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Helmut Richter (richter(AT)lrz.de), Mar 30 2004
STATUS
approved