login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A092131 Distance from 2^n to the next prime. 5
0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 17, 27, 3, 1, 29, 3, 21, 7, 17, 15, 9, 43, 35, 15, 29, 3, 11, 3, 11, 15, 17, 25, 53, 31, 9, 7, 23, 15, 27, 15, 29, 7, 59, 15, 5, 21, 69, 55, 21, 21, 5, 159, 3, 81, 9, 69, 131, 33, 15, 135, 29, 13, 131, 9, 3, 33, 29, 25, 11, 15, 29, 37, 33, 15, 11, 7, 23 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Essentially the same as A013597. - T. D. Noe, Jul 17 2007
LINKS
FORMULA
a(n) = nextprime(2^n) - 2^n.
a(n) = A007920(A000079(n)). - Michel Marcus, Oct 19 2022
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
Cf. A013597.
Equivalent sequence for previous prime: A013603.
Sequence in context: A340526 A161946 A013597 * A092099 A096567 A239626
KEYWORD
easy,nonn
AUTHOR
Helmut Richter (richter(AT)lrz.de), Mar 30 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:11 EDT 2024. Contains 371914 sequences. (Running on oeis4.)