OFFSET
0,7
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8191
Rémy Sigrist, Scatterplot of first 2^22 terms
Rémy Sigrist, C++ program
FORMULA
EXAMPLE
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.
PROG
(C++) See Links section.
(Python)
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
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Oct 01 2022
STATUS
approved