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 A091444 #19 Jul 28 2025 20:18:02 %S A091444 0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,1,1,0,1,1,1,0,1,1,1, %T A091444 0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,1,1,0,1,0,1,0,1,1,0,1,0, %U A091444 0,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1 %N A091444 Concatenate binary vectors ordered first by length, then by the number of 1's and finally lexicographically. %H A091444 Robert P. P. McKone, <a href="/A091444/b091444.txt">Table of n, a(n) for n = 0..18433</a> %t A091444 c[n_, k_] := If[k == 0, {0}, If[k == n, {2^n - 1}, Join[c[n - 1, k], c[n - 1, k - 1] + 2^(n - 1)]]]; %t A091444 b[n_] := If[n == 1, {0, 1}, Flatten[Table[c[n, k], {k, 0, n}]]]; %t A091444 a[n_] := Map[PadLeft, IntegerDigits[Array[b, n], 2]]; %t A091444 a[4] // Flatten (* _Robert P. P. McKone_, Aug 13 2021 *) %t A091444 Flatten[Table[SortBy[IntegerDigits[Range[0, 2^k - 1], 2, k], Total], {k, 4}]] (* _Paolo Xausa_, Jul 28 2025 *) %o A091444 (Python) %o A091444 from itertools import product %o A091444 def sortby(x): return (len(x), x.count(1), x) %o A091444 def agen(maxvecdigits): %o A091444 for i in range(1, maxvecdigits+1): %o A091444 for t in sorted([p for p in product([0, 1], repeat=i)], key=sortby): %o A091444 yield from t %o A091444 print([an for an in agen(4)]) # _Michael S. Branicky_, Aug 13 2021 %Y A091444 Cf. A076478, A091445, A091446, A091447. %Y A091444 Cf. A294648. %K A091444 easy,nonn %O A091444 0,1 %A A091444 _Paul Boddington_, Jan 10 2004