login
Excess run-compression of standard compositions. Sum of all parts minus sum of compressed parts of the n-th integer composition in standard order.
41

%I #9 Jun 28 2024 09:15:16

%S 0,0,0,1,0,0,0,2,0,0,2,1,0,0,1,3,0,0,0,1,0,2,0,2,0,0,2,1,1,1,2,4,0,0,

%T 0,1,3,0,0,2,0,0,4,3,0,0,1,3,0,0,0,1,0,2,0,2,1,1,3,2,2,2,3,5,0,0,0,1,

%U 0,0,0,2,0,3,2,1,0,0,1,3,0,0,0,1,2,4,2

%N Excess run-compression of standard compositions. Sum of all parts minus sum of compressed parts of the n-th integer composition in standard order.

%C 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 We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).

%H Gus Wiseman, <a href="https://docs.google.com/document/d/e/2PACX-1vTCPiJVFUXN8IqfLlCXkgP15yrGWeRhFS4ozST5oA4Bl2PYS-XTA3sGsAEXvwW-B0ealpD8qnoxFqN3/pub">Statistics, classes, and transformations of standard compositions</a>

%F a(n) = A029837(n) - A373953(n).

%e The excess compression of (2,1,1,3) is 1, so a(92) = 1.

%t stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;

%t Table[Total[stc[n]]-Total[First/@Split[stc[n]]],{n,0,100}]

%Y For length instead of sum we have A124762, counted by A106356.

%Y The opposite for length is A124767, counted by A238279 and A333755.

%Y Positions of zeros are A333489, counted by A003242.

%Y Positions of nonzeros are A348612, counted by A131044.

%Y Compositions counted by this statistic are A373951, opposite A373949.

%Y Compression of standard compositions is A373953.

%Y Positions of ones are A373955.

%Y A037201 gives compression of first differences of primes, halved A373947.

%Y A066099 lists the parts of all compositions in standard order.

%Y A114901 counts compositions with no isolated parts.

%Y A116861 counts partitions by this statistic, by length A116608.

%Y A240085 counts compositions with no unique parts.

%Y A333627 takes the rank of a composition to the rank of its run-lengths.

%Y Cf. A070939, A238130, A238343, A272919, A285981, A333213, A333381, A333382.

%K nonn

%O 0,8

%A _Gus Wiseman_, Jun 27 2024