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.
%I A118247 #17 Aug 20 2017 10:55:05 %S A118247 0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,1,0,0,1,0,1,0,1,0,1,1, %T A118247 0,1,1,0,1,1,0,0,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,1,0,0,0,1,1,1,0,0, %U A118247 1,0,0,1,0,0,1,1,0,1,0,1,0,0,0,1,1,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,1,1,1,0 %N A118247 a(0)=0. Concatenate onto the end of the sequence (from left to right) the integer m_n converted into binary (with the most significant digit on the left), where m_n is the smallest integer > A118248(n-1) and whose binary representation does not occur anywhere earlier in the sequence (when the concatenated sequence is read from left to right). A118248(n) then equals m_n when written in decimal. %C A118247 Sequence can be regarded as an irregular number triangle containing the binary digits of A118248(n) in row n. - _Michael De Vlieger_, Aug 19 2017 %H A118247 Michael De Vlieger, <a href="/A118247/b118247.txt">Table of n, a(n) for n = 0..11419</a> (Concatenation of A118248(0) through A118248(1000) inclusive). %e A118247 The sequence begins 0,1,1,0,1,0,0,1,1,1,1,0,0,0. Now A118248(5) = 8, which is represented by the 1,0,0,0 at the end of the sequence. The binary representation of 9 (1001 in binary) and (decimal) 10 (1010 in binary) both occur earlier in the sequence. But the binary representation of (decimal) 11 (1011 in binary) does not occur earlier in the sequence, so (1,0,1,1) is added to the end of the sequence. And A118248(6) becomes 11. %e A118247 From _Michael De Vlieger_, Aug 19 2017: (Start) %e A118247 n A118248(n) Binary digits appended to a(n) %e A118247 0 0 0 %e A118247 1 1 1 %e A118247 2 2 10 %e A118247 3 4 100 %e A118247 4 7 111 %e A118247 5 8 1000 %e A118247 6 11 1011 %e A118247 7 16 10000 %e A118247 8 18 10010 %e A118247 9 21 10101 %e A118247 10 22 10110 %e A118247 11 25 11001 %e A118247 12 29 11101 %e A118247 (End) %t A118247 Block[{a = {{0}}, b = {0}, k, d}, Do[k = FromDigits[#, 2] &@ Last@ a + 1; While[SequenceCount[Flatten@ a, Set[d, IntegerDigits[k, 2]]] > 0, k++]; AppendTo[a, d]; AppendTo[b, k], {i, 22}]; Flatten@ a] (* _Michael De Vlieger_, Aug 19 2017 *) %Y A118247 Cf. A118248, A118249, A118251. %K A118247 easy,nonn,base,tabf %O A118247 0,1 %A A118247 _Leroy Quet_, Apr 18 2006 %E A118247 More terms from _Joshua Zucker_, Jul 27 2006