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.
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
Examples
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.
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
Programs
-
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
Comments