cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A262350 #28 Dec 13 2017 04:19:12
%S A262350 2,3,5,7,13,11,29,53,43,23,31,61,59,109,181,107,173,367,223,191,127,
%T A262350 509,1013,4013,3931,3767,13757,11131,2939,1783,3037,1979,3821,3547,
%U A262350 1499,1901,877,2927,1759,1471,1789,1531,2029,2011,7901,60887,56239,93887,28351
%N 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.
%C A262350 This sequence is infinite.  The number of primes that are not in this sequence is conjectured to be infinite.
%C A262350 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 A262350 Alois P. Heinz, <a href="/A262350/b262350.txt">Table of n, a(n) for n = 1..589</a>
%H A262350 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 A262350 : 10                             ... 2
%e A262350 :   11                           ... 3
%e A262350 :    101                         ... 5
%e A262350 :      111                       ... 7
%e A262350 :       1101                     ... 13
%e A262350 :        1011                    ... 11
%e A262350 :          11101                 ... 29
%e A262350 :           110101               ... 53
%e A262350 :            101011              ... 43
%e A262350 :              10111             ... 23
%e A262350 :                11111           ... 31
%e A262350 :                 111101         ... 61
%e A262350 :                  111011        ... 59
%e A262350 :                   1101101      ... 109
%e A262350 :                    10110101    ... 181
%e A262350 :                      1101011   ... 107
%e A262350 :                       10101101 ... 173
%p A262350 b:= proc() true end:
%p A262350 a:= proc(n) option remember; local h, k, ok, p, t;
%p A262350       if n=1 then p:=2
%p A262350     else h:= (k-> irem(k, 2^(ilog2(k))))(a(n-1)); p:= h;
%p A262350          ok:= isprime(p) and b(p);
%p A262350          for t while not ok do
%p A262350            for k to 2^t-1 while not ok do p:= h*2^t+k;
%p A262350              ok:= isprime(p) and b(p)
%p A262350            od
%p A262350          od
%p A262350       fi; b(p):= false; p
%p A262350     end:
%p A262350 seq(a(n), n=1..70);
%Y A262350 Binary analog of A262283.
%Y A262350 Primes whose binary expansion begins with binary expansion of 1, 2, 3, 4, 5, 6, 7: A000040, A080165, A080166, A262286, A262284, A262287, A262285.
%Y A262350 Cf. A262365.
%K A262350 nonn,base
%O A262350 1,1
%A A262350 _Alois P. Heinz_, Sep 18 2015