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 A131095 #13 Aug 24 2015 02:29:02 %S A131095 2,4,9,17,18,20,33,34,36,40,65,66,68,72,80,129,130,132,136,144,160, %T A131095 257,258,260,264,272,288,320,513,514,516,520,528,544,576,640,1025, %U A131095 1026,1028,1032,1040,1056,1088,1152,1280,2049,2050,2052,2056,2064,2080,2112,2176 %N A131095 Triangle where n-th row contains the smallest n positive integers (listed in order) with exactly n nonleading 0's in their binary representations and where the smallest term in the n-th row is > that the largest term in the (n-1)th row. %H A131095 Reinhard Zumkeller, <a href="/A131095/b131095.txt">Rows n = 1..125 of triangle, flattened</a> %e A131095 Binary representations of the terms in the first few rows: %e A131095 10 %e A131095 100, 1001 %e A131095 10001, 10010, 10100 %e A131095 100001, 100010, 100100, 101000 %p A131095 A023416 := proc(n) local brep,i ; brep := convert(n,base,2) ; add( 1-op(i,brep),i=1..nops(brep)) ; end: A131095 := proc(rowmax) local a,r,c ; a := 2 ; for r from 1 to rowmax do c := 1 ; while c <= r do if A023416(a) = r then printf("%d, ",a) ; c := c+1 ; fi ; a := a+1 ; od ; od ; end: A131095(10) ; # _R. J. Mathar_, Jun 15 2007 %o A131095 (Haskell) %o A131095 import Data.List (sort, nub) %o A131095 a131095 n k = a131095_tabl !! (n-1) !! (k-1) %o A131095 a131095_row n = a131095_tabl !! (n-1) %o A131095 a131095_tabl = [2] : [4, 9] : [17, 18, 20] : f 4 [17, 18, 20] where %o A131095 f v ws = ys : f (v + 1) ys where %o A131095 ys = take v $ dropWhile (<= last ws) $ nub $ sort $ concatMap h ws %o A131095 h z = [2 * z, 4 * z + 1, 4 * z' + b] where (z', b) = divMod z 2 %o A131095 -- _Reinhard Zumkeller_, Feb 11 2015 %Y A131095 Cf. A081118, A131094. %K A131095 nonn,tabl %O A131095 1,1 %A A131095 _Leroy Quet_, Jun 14 2007 %E A131095 More terms from _R. J. Mathar_, Jun 15 2007