login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(0)=0. Concatenate onto the end of the sequence (from left to right) the integer m_n converted into binary and reversed (with the most significant digit on the right), where m_n is the smallest integer > A118250(n-1) and whose reversed binary representation does not occur anywhere earlier in the sequence (when the concatenated sequence is read from left to right). A118250(n) then equals m_n when written in decimal.
5

%I #14 Sep 20 2017 03:40:34

%S 0,1,1,1,0,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,1,0,0,0,0,1,0,1,0,

%T 0,1,1,1,1,0,1,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,1,0,0,1,0,0,1,0,1,1,0,

%U 0,1,1,1,0,1,0,1,1,1,1,0,1,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,1

%N a(0)=0. Concatenate onto the end of the sequence (from left to right) the integer m_n converted into binary and reversed (with the most significant digit on the right), where m_n is the smallest integer > A118250(n-1) and whose reversed binary representation does not occur anywhere earlier in the sequence (when the concatenated sequence is read from left to right). A118250(n) then equals m_n when written in decimal.

%H Michael De Vlieger, <a href="/A118249/b118249.txt">Table of n, a(n) for n = 0..5167</a> (terms 0 <= m <= 500 flattened)

%e The sequence begins 0,1,1,1,0,0,1,1,0,1,0,0,0,1,0,1,0,1. Now A118250(6) = 10 (decimal), which is represented by the 0,1,0,1 at the end of the sequence. The binary representation of (decimal) 11 (1101 in binary and reversed) and 12 (0011 in binary and reversed) both occur earlier in the sequence. But the binary representation of 13 (1011 in binary and reversed) does not occur earlier in the sequence, so (1,0,1,1) is added to the end of the sequence. And A118250(7) becomes 13.

%t a = {{0}}; Do[k = 1; While[SequenceCount[Flatten@ a, Set[m, Reverse@ IntegerDigits[k, 2]]] > 0, k++]; AppendTo[a, m], {i, 22}]; Flatten@ a (* _Michael De Vlieger_, Sep 19 2017 *)

%Y Cf. A118247, A118250, A118251.

%K easy,nonn,base

%O 0,1

%A _Leroy Quet_, Apr 18 2006

%E More terms from _Joshua Zucker_, Jul 27 2006