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
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Jun 23 2025
STATUS
approved
