cp's OEIS Frontend

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.

A385816 The number k such that the k-th composition in standard order lists the maximal anti-run lengths of the binary indices of n. Standard composition number of row n of A384877.

This page as a plain text file.
%I A385816 #11 Jul 18 2025 08:30:27
%S A385816 0,1,1,3,1,2,3,7,1,2,2,6,3,5,7,15,1,2,2,6,2,4,6,14,3,5,5,13,7,11,15,
%T A385816 31,1,2,2,6,2,4,6,14,2,4,4,12,6,10,14,30,3,5,5,13,5,9,13,29,7,11,11,
%U A385816 27,15,23,31,63,1,2,2,6,2,4,6,14,2,4,4,12,6,10,14
%N A385816 The number k such that the k-th composition in standard order lists the maximal anti-run lengths of the binary indices of n. Standard composition number of row n of A384877.
%C A385816 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.
%C A385816 The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
%C A385816 If the k-th composition in standard order is y, then the standard composition number of y is defined to be k.
%H A385816 Gus Wiseman, <a href="https://docs.google.com/document/d/e/2PACX-1vTCPiJVFUXN8IqfLlCXkgP15yrGWeRhFS4ozST5oA4Bl2PYS-XTA3sGsAEXvwW-B0ealpD8qnoxFqN3/pub">Statistics, classes, and transformations of standard compositions</a>
%e A385816 The binary indices of 181 are {1,3,5,6,8}, with maximal anti-runs ((1,3,5),(6,8)), with lengths (3,2), which is the 18th composition in standard order, so a(181) = 18.
%t A385816 bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
%t A385816 stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
%t A385816 stcinv/@Table[Length/@Split[bpe[n],#2!=#1+1&],{n,0,100}]
%Y A385816 The reverse version is A209859.
%Y A385816 Sorted positions of first appearances are A247648.
%Y A385816 These are standard composition numbers of rows of A384877 (duplicates removed A385886).
%Y A385816 For runs instead of anti-runs the reverse is A385887 (duplicates removed A232559).
%Y A385816 For runs instead of anti-runs we have A385889 (duplicates removed A385818).
%Y A385816 A245563 lists run lengths of binary indices (ranks A246029), reverse A245562.
%Y A385816 Cf. A000120, A029931, A044813, A048793, A052499, A069010, A348366, A384175, A384878, A384879, A384893.
%K A385816 nonn
%O A385816 0,4
%A A385816 _Gus Wiseman_, Jul 15 2025