login
A380911
Triangle read by rows: Row n is the initial segment [1, 2, ..., n] sorted into lexicographic order defined by the binary representation of the terms.
1
1, 1, 2, 1, 2, 3, 1, 2, 4, 3, 1, 2, 4, 5, 3, 1, 2, 4, 5, 3, 6, 1, 2, 4, 5, 3, 6, 7, 1, 2, 4, 8, 5, 3, 6, 7, 1, 2, 4, 8, 9, 5, 3, 6, 7, 1, 2, 4, 8, 9, 5, 10, 3, 6, 7, 1, 2, 4, 8, 9, 5, 10, 11, 3, 6, 7, 1, 2, 4, 8, 9, 5, 10, 11, 3, 6, 12, 7
OFFSET
1,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..11325 (rows 1..150 of triangle, flattened).
EXAMPLE
Triangle starts:
[1] [1]
[2] [1, 2]
[3] [1, 2, 3]
[4] [1, 2, 4, 3]
[5] [1, 2, 4, 5, 3]
[6] [1, 2, 4, 5, 3, 6]
[7] [1, 2, 4, 5, 3, 6, 7]
[8] [1, 2, 4, 8, 5, 3, 6, 7]
[9] [1, 2, 4, 8, 9, 5, 3, 6, 7]
[10] [1, 2, 4, 8, 9, 5, 10, 3, 6, 7]
.
The binary representations of the numbers 1..12 in lexicographic order are:
[1, 10, 100, 1000, 1001, 101, 1010, 1011, 11, 110, 1100, 111]. Therefore row 12 is
[1, 2, 4, 8, 9, 5, 10, 11, 3, 6, 12, 7].
MAPLE
row := proc(n) sort(convert~([$n], binary), key=String); (convert~(%, decimal, 2)) end:
seq(op(row(n)), n = 1..12);
MATHEMATICA
A380911row[n_] := Map[FromDigits[#, 2] &, Sort[IntegerString[Range[n], 2]]];
Array[A380911row, 15] (* Paolo Xausa, Feb 08 2025 *)
CROSSREFS
Cf. A007088.
Sequence in context: A265692 A370263 A376308 * A194976 A195082 A210535
KEYWORD
nonn,tabl,base,new
AUTHOR
Peter Luschny, Feb 08 2025
STATUS
approved