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 A384878 #12 Jun 25 2025 18:04:30 %S A384878 1,6,34,178,882,4210,19570,89202,400498,1776754 %N A384878 Position of first appearance of n in the flattened version of the triangle A384877, whose m-th row lists the lengths of maximal anti-runs in the binary indices of m. %C A384878 A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793. %e A384878 The set of binary indices of each nonnegative integer and its partition into anti-runs begins: %e A384878 0: {} {{}} %e A384878 1: {1} {{1}} %e A384878 2: {2} {{2}} %e A384878 3: {1,2} {{1},{2}} %e A384878 4: {3} {{3}} %e A384878 5: {1,3} {{1,3}} %e A384878 6: {2,3} {{2},{3}} %e A384878 7: {1,2,3} {{1},{2},{3}} %e A384878 The flattened version begins: {}, {1}, {2}, {1}, {2}, {3}, {1,3}, {2}, {3}, {1}, {2}, {3}. Of these sets, the first of length 2 is the sixth (starting with 0), so we have a(2) = 6. %t A384878 bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1]; %t A384878 mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0]; %t A384878 q=Join@@Table[Length/@Split[bpe[n],#2!=#1+1&],{n,0,100}]; %t A384878 Table[Position[q,i][[1,1]],{i,mnrm[q]}] %Y A384878 For runs instead of anti-runs we have A001792. %Y A384878 The unflattened version is A052499. %Y A384878 Positions of first appearances in A384877, see A000120, A245562, A245563, A384890. %Y A384878 A023758 lists differences of powers of 2. %Y A384878 A384175 counts subsets with all distinct lengths of maximal runs, complement A384176. %Y A384878 Cf. A044813, A048793, A069010, A384879, A384893. %K A384878 nonn,more %O A384878 1,2 %A A384878 _Gus Wiseman_, Jun 23 2025