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 A323455 #26 Jun 27 2025 22:39:13 %S A323455 2,4,5,6,8,9,10,10,12,11,13,14,16,17,18,18,20,19,21,22,20,24,21,25,26, %T A323455 22,26,28,23,27,29,30,32,33,34,34,36,35,37,38,36,40,37,41,42,38,42,44, %U A323455 39,43,45,46,40,48,41,49,50,42,50,52,43,51,53,54,44,52,56 %N A323455 Irregular triangle read by rows: row n lists the numbers that can be obtained from the binary expansion of n by inserting a single 0 after any 1. %C A323455 All the numbers in row n have the same binary weight (A000120) as n. %H A323455 Michael S. Branicky, <a href="/A323455/b323455.txt">Table of n, a(n) for n = 1..10870</a> (Rows 1..2000, flattened) %e A323455 From 7 = 111 we can get 1011 = 11, 1101 = 13, and 1110 = 14, so row 7 is {11,13,14}. %e A323455 The triangle begins: %e A323455 2, %e A323455 4, %e A323455 5, 6, %e A323455 8, %e A323455 9, 10, %e A323455 10, 12, %e A323455 11, 13, 14, %e A323455 16, %e A323455 17, 18, %e A323455 18, 20, %e A323455 19, 21, 22, %e A323455 ... %t A323455 r323455[n_] := Module[{digs=IntegerDigits[n, 2]}, Map[FromDigits[#, 2]&, Map[Insert[digs, 0, #+1]&, Flatten[Position[digs, 1]]]]] (* nth row *) %t A323455 a323455[{m_, n_}] := Flatten[Map[r323455, Range[m, n]]] %t A323455 a323455[{1, 28}] (* _Hartmut F. W. Hoft_, Oct 24 2023 *) %o A323455 (Python) %o A323455 def row(n): %o A323455 b = bin(n)[2:] %o A323455 s = set(b[:i+1] + "0" + b[i+1:] for i in range(len(b)) if b[i] == "1") %o A323455 return sorted(int(w, 2) for w in s) %o A323455 print([c for n in range(1, 29) for c in row(n)]) # _Michael S. Branicky_, Jul 24 2022 %Y A323455 Cf. A000120. See A323456 for a closely related sequence, the binary analog of A323386. %K A323455 nonn,base,tabf %O A323455 1,1 %A A323455 _N. J. A. Sloane_, Jan 16 2019 %E A323455 More terms from _David Consiglio, Jr._, Jan 17 2019 %E A323455 a(49) and beyond from _Michael S. Branicky_, Jul 24 2022