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 A081118 #23 Jul 04 2020 02:21:40 %S A081118 1,3,5,7,11,13,15,23,27,29,31,47,55,59,61,63,95,111,119,123,125,127, %T A081118 191,223,239,247,251,253,255,383,447,479,495,503,507,509,511,767,895, %U A081118 959,991,1007,1015,1019,1021,1023,1535,1791,1919,1983,2015,2031,2039,2043 %N A081118 Triangle of first n numbers per row having exactly n 1's in binary representation. %C A081118 T(n,n) = A036563(n+1) = 2^(n+1) - 3. %C A081118 Numbers of the form 2^t - 2^k - 1, 1 <= k < t. %H A081118 Reinhard Zumkeller, <a href="/A081118/b081118.txt">Rows n=1..150 of triangle, flattened</a> %F A081118 T(n, k) = 2^(n+1) - 2^(n-k+1) - 1, 1<=k<=n. %F A081118 a(n) = (2^A002260(n)-1)*2^A004736(n)-1; a(n)=(2^i-1)*2^j-1, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - _Boris Putievskiy_, Apr 04 2013 %e A081118 Triangle begins: %e A081118 .......... 1 ......... ................ 1 %e A081118 ........ 3...5 ....... .............. 11 101 %e A081118 ...... 7..11..13 ..... .......... 111 1011 1101 %e A081118 ... 15..23..27..29 ... ...... 1111 10111 11011 11101 %e A081118 . 31..47..55..59..61 . . 11111 101111 110111 111011 111101. %t A081118 Table[2^(n+1)-2^(n-k+1)-1,{n,10},{k,n}]//Flatten (* _Harvey P. Dale_, Apr 09 2020 *) %o A081118 (Haskell) %o A081118 a081118 n k = a081118_tabl !! (n-1) !! (k-1) %o A081118 a081118_row n = a081118_tabl !! (n-1) %o A081118 a081118_tabl = iterate %o A081118 (\row -> (map ((+ 1) . (* 2)) row) ++ [4 * (head row) + 1]) [1] %o A081118 a081118_list = concat a081118_tabl %o A081118 -- _Reinhard Zumkeller_, Feb 23 2012 %Y A081118 Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691, A038461, A038462, A038463. %Y A081118 Cf. A181741 (primes), A208083, subsequence of A089633. %Y A081118 Cf. A131094. %K A081118 nonn,tabl %O A081118 1,2 %A A081118 _Reinhard Zumkeller_, Mar 06 2003