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 A131094 #13 Aug 24 2015 02:38:45 %S A131094 2,4,9,8,17,18,16,33,34,36,32,65,66,68,72,64,129,130,132,136,144,128, %T A131094 257,258,260,264,272,288,256,513,514,516,520,528,544,576,512,1025, %U A131094 1026,1028,1032,1040,1056,1088,1152,1024,2049,2050,2052,2056,2064,2080,2112 %N A131094 Triangle where n-th row contains the smallest n positive integers (listed in order) with exactly n nonleading 0's in their binary representations. %H A131094 Reinhard Zumkeller, <a href="/A131094/b131094.txt">Rows n = 1..125 of triangle, flattened</a> %e A131094 Binary representations of the terms in the first few rows: %e A131094 10 %e A131094 100, 1001 %e A131094 1000, 10001, 10010 %e A131094 10000, 100001, 100010, 100100 %p A131094 A080791 := proc(n) local bdigs ; bdigs := convert(n,base,2) ; nops(bdigs)-add(i,i=bdigs) ; end: A131094 := proc(n) local a,i; a := [] ; i := 2^n ; while nops(a) < n do while A080791(i) <> n do i := i+1 ; od: a := [op(a),i] ; i := i+1 ; od: RETURN(a) ; end: seq(op(A131094(n)),n=1..10) ; # _R. J. Mathar_, Oct 17 2007 %o A131094 (Haskell) %o A131094 import Data.List (sort, nub) %o A131094 a131094 n k = a131094_tabl !! (n-1) !! (k-1) %o A131094 a131094_row n = a131094_tabl !! (n-1) %o A131094 a131094_tabl = [2] : f 2 [2] where %o A131094 f v ws = ys : f (v + 1) ys where %o A131094 ys = take v $ nub $ sort $ concatMap h ws %o A131094 h z = [2 * z, 4 * z + 1, 4 * z' + b] where (z', b) = divMod z 2 %o A131094 -- _Reinhard Zumkeller_, Feb 11 2015 %Y A131094 Cf. A081118, A131095. %K A131094 nonn,tabl %O A131094 1,1 %A A131094 _Leroy Quet_, Jun 14 2007 %E A131094 More terms from _R. J. Mathar_, Oct 17 2007