login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262350 a(1) = 2. For n>1, let s denote the binary string of a(n-1) with the leftmost 1 and following consecutive 0's removed. Then a(n) is the smallest prime not yet present whose binary representation begins with s. 7

%I

%S 2,3,5,7,13,11,29,53,43,23,31,61,59,109,181,107,173,367,223,191,127,

%T 509,1013,4013,3931,3767,13757,11131,2939,1783,3037,1979,3821,3547,

%U 1499,1901,877,2927,1759,1471,1789,1531,2029,2011,7901,60887,56239,93887,28351

%N a(1) = 2. For n>1, let s denote the binary string of a(n-1) with the leftmost 1 and following consecutive 0's removed. Then a(n) is the smallest prime not yet present whose binary representation begins with s.

%C This sequence is infinite. The number of primes that are not in this sequence is conjectured to be infinite.

%C Proof of first statement, following a comment from _David W. Wilson_: It follows from standard results about primes in short intervals (see for example Harman, 1982) that there are infinitely many numbers in any base b starting with any nonzero prefix c. So there are infinitely many primes whose binary expansion begins with s, and so a(n) always exists. - _N. J. A. Sloane_, Sep 19 2015

%H Alois P. Heinz, <a href="/A262350/b262350.txt">Table of n, a(n) for n = 1..589</a>

%H G. Harman, <a href="http://gdz.sub.uni-goettingen.de/dms/load/img/?PID=GDZPPN002426536">Primes in short intervals</a>, Math. Zeit., 180 (1982), 335-348.

%e : 10 ... 2

%e : 11 ... 3

%e : 101 ... 5

%e : 111 ... 7

%e : 1101 ... 13

%e : 1011 ... 11

%e : 11101 ... 29

%e : 110101 ... 53

%e : 101011 ... 43

%e : 10111 ... 23

%e : 11111 ... 31

%e : 111101 ... 61

%e : 111011 ... 59

%e : 1101101 ... 109

%e : 10110101 ... 181

%e : 1101011 ... 107

%e : 10101101 ... 173

%p b:= proc() true end:

%p a:= proc(n) option remember; local h, k, ok, p, t;

%p if n=1 then p:=2

%p else h:= (k-> irem(k, 2^(ilog2(k))))(a(n-1)); p:= h;

%p ok:= isprime(p) and b(p);

%p for t while not ok do

%p for k to 2^t-1 while not ok do p:= h*2^t+k;

%p ok:= isprime(p) and b(p)

%p od

%p od

%p fi; b(p):= false; p

%p end:

%p seq(a(n), n=1..70);

%Y Binary analog of A262283.

%Y Primes whose binary expansion begins with binary expansion of 1, 2, 3, 4, 5, 6, 7: A000040, A080165, A080166, A262286, A262284, A262287, A262285.

%Y Cf. A262365.

%K nonn,base

%O 1,1

%A _Alois P. Heinz_, Sep 18 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 17:50 EDT 2019. Contains 328268 sequences. (Running on oeis4.)