This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A356784 #73 Nov 01 2022 10:26:19 %S A356784 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, %T A356784 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, %U A356784 23,25,28,27,29,30,31,0,1,2,4,8,16,32,3,5,9,17,33 %N 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. %C A356784 The n-th row contains A011782(n) terms, and is a permutation of 0..A011782(n)-1. %C A356784 The leading term of each row is 0, and is followed by powers of 2, and then by positive nonpowers of 2. %H A356784 Rémy Sigrist, <a href="/A356784/b356784.txt">Table of n, a(n) for n = 0..8191</a> %H A356784 Rémy Sigrist, <a href="/A356784/a356784.png">Scatterplot of first 2^22 terms</a> %H A356784 Rémy Sigrist, <a href="/A356784/a356784.txt">C++ program</a> %F A356784 a(n) = 0 iff n belongs to A131577. %F A356784 a(n) = 1 iff n belongs to A000051 \ {2}. %F A356784 a(n) = 2 iff n belongs to A052548 \ {3, 4}. %F A356784 a(n) = 3 iff n belongs to A005126 \ {2, 4}. %F A356784 T(n, 0) = 0. %F A356784 T(n, k) = 2^(k-1) for k = 1..n-1. %e A356784 Table begins: %e A356784 0, %e A356784 0, %e A356784 0, 1, %e A356784 0, 1, 2, 3, %e A356784 0, 1, 2, 4, 3, 5, 6, 7, %e A356784 0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 7, 12, 11, 13, 14, 15, %e A356784 ... %e A356784 For n = 5: %e A356784 - the terms in rows 0..4 are: 0, 0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 4, 3, 5, 6, 7, %e A356784 - we have 0's at positions 0, 1, 2, 4, 8, %e A356784 - we have 1's at positions 3, 5, 9, %e A356784 - we have 2's at positions 6, 10, %e A356784 - we have 3's at positions 7, 12, %e A356784 - we have one 4 at position 11, %e A356784 - we have one 5 at position 13, %e A356784 - we have one 6 at position 14, %e A356784 - we have one 7 at position 15, %e A356784 - so row 5 is: 0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 7, 12, 11, 13, 14, 15. %o A356784 (C++) See Links section. %o A356784 (Python) %o A356784 terms = [0,] %o A356784 for i in range(1,10): %o A356784 new_terms = [] %o A356784 for j in range(max(terms)+1): %o A356784 for k in range(len(terms)): %o A356784 if terms[k] == j: new_terms.append(k) %o A356784 terms.extend(new_terms) %o A356784 print(terms) # _Gleb Ivanov_, Nov 01 2022 %Y A356784 Cf. A000051, A005126, A011782 (row lengths), A052548, A131577, A342585, A357317, A357491. %K A356784 nonn,tabf %O A356784 0,7 %A A356784 _Rémy Sigrist_, Oct 01 2022