The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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. 6

%I #15 May 28 2024 15:01:39

%S 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,

%T 3,11,15,17,25,53,31,9,7,23,15,27,15,29,7,59,15,5,21,69,55,21,21,5,

%U 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

%N Distance from 2^n to the next prime.

%C Essentially the same as A013597. - T. D. Noe, Jul 17 2007

%C From _Jianing Song_, May 28 2024: (Start)

%C 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.

%C 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)

%H T. D. Noe, <a href="/A092131/b092131.txt">Table of n, a(n) for n=1..5000</a>

%F a(n) = nextprime(2^n) - 2^n.

%F a(n) = A007920(A000079(n)). - _Michel Marcus_, Oct 19 2022

%e a(13)=17 because 2^13=8192 and the next prime is 8209=8192+17.

%t Join[{0},NextPrime[#]-#&/@(2^Range[2,80])] (* _Harvey P. Dale_, Jun 06 2012 *)

%o (PARI) for(i=1,100,x=2^i;print1(nextprime(x)-x,","))

%Y Cf. A013597.

%Y Equivalent sequence for previous prime: A013603.

%Y Cf. A000079, A007920, A067760, A076336.

%K easy,nonn,changed

%O 1,3

%A Helmut Richter (richter(AT)lrz.de), Mar 30 2004

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 June 3 19:11 EDT 2024. Contains 373087 sequences. (Running on oeis4.)