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 A119709 #14 Apr 09 2014 10:15:01 %S A119709 0,1,0,1,2,1,3,0,1,2,4,0,1,2,5,0,1,2,3,6,1,3,7,0,1,2,4,8,0,1,2,4,9,0, %T A119709 1,2,5,10,0,1,2,3,5,11,0,1,2,3,4,6,12,0,1,2,3,5,6,13,0,1,2,3,6,7,14,1, %U A119709 3,7,15,0,1,2,4,8,16,0,1,2,4,8,17,0,1,2,4,9,18,0,1,2,3,4,9,19,0,1,2,4,5,10 %N A119709 Table where n-th row (of A078822(n) terms) contains the distinct nonnegative integers which, when written in binary, are substrings of n written in binary. %H A119709 Reinhard Zumkeller, <a href="/A119709/b119709.txt">Rows n = 0..511 of table, flattened</a> %e A119709 12 in binary is 1100. Within this binary representation there is 0 (occurring twice), 1 (occurring twice), 10 (= 2 in decimal), 11 (= 3 in decimal), 100 (= 4 in decimal), 110 (= 6 in decimal) and 1100 (= 12 in decimal). %e A119709 So row 12 = (0,1,2,3,4,6,12). %o A119709 (Haskell) %o A119709 import Data.List (isInfixOf) %o A119709 a119709 n k = a119709_tabf !! n !! k %o A119709 a119709_row n = map (foldr (\d v -> v * 2 + toInteger d) 0) $ %o A119709 filter (`isInfixOf` (a030308_row n)) $ take (n + 1) a030308_tabf %o A119709 a119709_tabf = map a119709_row [0..] %o A119709 -- _Reinhard Zumkeller_, Aug 14 2013 %Y A119709 Cf. A078822. %Y A119709 Cf. A030308, A165416. %K A119709 tabf,easy,nonn,look %O A119709 0,5 %A A119709 _Leroy Quet_, Jun 10 2006 %E A119709 Extended by _Ray Chandler_, Mar 13 2010