close
login
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.
20
1, 6, 34, 178, 882, 4210, 19570, 89202, 400498, 1776754
OFFSET
1,2
COMMENTS
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.
EXAMPLE
The set of binary indices of each nonnegative integer and its partition into anti-runs begins:
0: {} {{}}
1: {1} {{1}}
2: {2} {{2}}
3: {1,2} {{1},{2}}
4: {3} {{3}}
5: {1,3} {{1,3}}
6: {2,3} {{2},{3}}
7: {1,2,3} {{1},{2},{3}}
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.
MATHEMATICA
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n, 2]], 1];
mnrm[s_]:=If[Min@@s==1, mnrm[DeleteCases[s-1, 0]]+1, 0];
q=Join@@Table[Length/@Split[bpe[n], #2!=#1+1&], {n, 0, 100}];
Table[Position[q, i][[1, 1]], {i, mnrm[q]}]
CROSSREFS
For runs instead of anti-runs we have A001792.
The unflattened version is A052499.
Positions of first appearances in A384877, see A000120, A245562, A245563, A384890.
A023758 lists differences of powers of 2.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
Sequence in context: A344717 A266359 A198765 * A274405 A144142 A126643
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Jun 23 2025
STATUS
approved