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.

A118250 The least nonnegative integer whose reversed binary representation does not occur in the concatenation of the reversed binary representations of all preceding terms.

This page as a plain text file.
%I A118250 #26 Sep 20 2017 03:40:29
%S A118250 0,1,3,4,5,8,10,13,15,16,18,23,24,32,35,36,38,43,55,64,66,68,70,75,76,
%T A118250 79,83,85,88,91,95,97,116,119,120,127,128,130,132,136,140,143,147,149,
%U A118250 150,155,157,158,163,169,170,175,176,182,186,192,196,208
%N A118250 The least nonnegative integer whose reversed binary representation does not occur in the concatenation of the reversed binary representations of all preceding terms.
%C A118250 "Reversed" means here "read from right to left", or "least significant bit first" (and not e.g. bitwise negation). One could also drop "reversed" everywhere and concatenate the preceding terms in decreasing order. The definition yields necessarily a strictly increasing sequence. - _M. F. Hasler_, Dec 29 2012
%H A118250 Rainer Rosenthal, <a href="/A118250/b118250.txt">Table of n, a(n) for n = 0..9999</a>
%e A118250 The concatenation of the reversed binary representation of the first 5 terms (0, 1, 3, 4, 5) is concat(0,1,11,001,101)=0111001101. The reversed binary representation of the yet unused numbers 2,6,7,8,... are 01,011,111,0001,... It is seen that only the last of these four strings is not yet a substring in the above, therefore a(5)=8.
%t A118250 a = {{0}}; Do[k = 1; While[SequenceCount[Flatten@ a, Set[m, Reverse@ IntegerDigits[k, 2]]] > 0, k++]; AppendTo[a, m], {i, 57}]; Map[FromDigits[#, 2] &@ Reverse@ # &, a] (* _Michael De Vlieger_, Sep 19 2017 *)
%o A118250 (PARI) A118250(n,show=0,a=0)={my(c=[a],S=[],L); for(k=1,n, show && print1(a","); while( setsearch(S,binary(a++)),); c=concat(binary(a),c); S=[]; for(i=0,#c-L=#binary(a), c[i+1] & for(j=i+L,min(i+L+1,#c), S=setunion(S,Set(t=[vecextract(c,2^j-2^i)])))));a}  \\ _M. F. Hasler_, Dec 29 2012
%Y A118250 See A118249 for the concatenation of the reversed binary representations.
%Y A118250 Cf. A118248 (variant without reversal), A118252 (the same with positive terms).
%K A118250 easy,nonn
%O A118250 0,3
%A A118250 _Leroy Quet_, Apr 18 2006
%E A118250 More terms from _Graeme McRae_, Apr 19 2006
%E A118250 Explicit definition from _M. F. Hasler_, Dec 29 2012