OFFSET
1,1
COMMENTS
All the numbers in row n have the same binary weight (A000120) as n.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10870 (Rows 1..2000, flattened)
EXAMPLE
From 7 = 111 we can get 1011 = 11, 1101 = 13, and 1110 = 14, so row 7 is {11,13,14}.
The triangle begins:
2,
4,
5, 6,
8,
9, 10,
10, 12,
11, 13, 14,
16,
17, 18,
18, 20,
19, 21, 22,
...
MATHEMATICA
r323455[n_] := Module[{digs=IntegerDigits[n, 2]}, Map[FromDigits[#, 2]&, Map[Insert[digs, 0, #+1]&, Flatten[Position[digs, 1]]]]] (* nth row *)
a323455[{m_, n_}] := Flatten[Map[r323455, Range[m, n]]]
a323455[{1, 28}] (* Hartmut F. W. Hoft, Oct 24 2023 *)
PROG
(Python)
def row(n):
b = bin(n)[2:]
s = set(b[:i+1] + "0" + b[i+1:] for i in range(len(b)) if b[i] == "1")
return sorted(int(w, 2) for w in s)
print([c for n in range(1, 29) for c in row(n)]) # Michael S. Branicky, Jul 24 2022
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
N. J. A. Sloane, Jan 16 2019
EXTENSIONS
More terms from David Consiglio, Jr., Jan 17, 2019
a(49) and beyond from Michael S. Branicky, Jul 24 2022
STATUS
approved