Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15, 16, 17, 18, 20, 24, 19, 21, 25, 22, 26, 23, 28, 27, 29, 30, 31, 32, 33, 34, 36, 40, 48, 35, 37, 41, 49, 38, 42, 50, 39, 44, 53, 43, 51, 45, 54, 46, 56, 47, 58, 52, 55, 57, 60, 59, 61, 62, 63, 64, 65, 66, 68
Offset: 0
A357491(89) = 100, hence a(100) = 89.
A356784
Inventory of positions as an irregular table; row 0 contains 0, subsequent rows contain the 0-based positions of 0's, followed by the position of 1's, of 2's, etc. in prior rows flattened.
Original entry on oeis.org
0, 0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 4, 3, 5, 6, 7, 0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 7, 12, 11, 13, 14, 15, 0, 1, 2, 4, 8, 16, 3, 5, 9, 17, 6, 10, 18, 7, 12, 21, 11, 19, 13, 22, 14, 24, 15, 26, 20, 23, 25, 28, 27, 29, 30, 31, 0, 1, 2, 4, 8, 16, 32, 3, 5, 9, 17, 33
Offset: 0
Table begins:
0,
0,
0, 1,
0, 1, 2, 3,
0, 1, 2, 4, 3, 5, 6, 7,
0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 7, 12, 11, 13, 14, 15,
...
For n = 5:
- the terms in rows 0..4 are: 0, 0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 4, 3, 5, 6, 7,
- we have 0's at positions 0, 1, 2, 4, 8,
- we have 1's at positions 3, 5, 9,
- we have 2's at positions 6, 10,
- we have 3's at positions 7, 12,
- we have one 4 at position 11,
- we have one 5 at position 13,
- we have one 6 at position 14,
- we have one 7 at position 15,
- so row 5 is: 0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 7, 12, 11, 13, 14, 15.
-
terms = [0,]
for i in range(1,10):
new_terms = []
for j in range(max(terms)+1):
for k in range(len(terms)):
if terms[k] == j: new_terms.append(k)
terms.extend(new_terms)
print(terms) # Gleb Ivanov, Nov 01 2022
Showing 1-2 of 2 results.
Comments