|
|
A352516
|
|
Number of excedances (parts above the diagonal) of the n-th composition in standard order.
|
|
15
|
|
|
0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,21
|
|
COMMENTS
|
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. See also A000120, A059893, A070939, A114994, A225620.
|
|
LINKS
|
|
|
EXAMPLE
|
The 5392th composition in standard order is (2,2,4,5), with excedances {1,3,4}, so a(5392) = 3.
|
|
MATHEMATICA
|
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
pd[y_]:=Length[Select[Range[Length[y]], #<y[[#]]&]];
Table[pd[stc[n]], {n, 0, 30}]
|
|
CROSSREFS
|
Positions of first appearances are A104462.
The triangle A352524 counts these compositions (first column A008930).
A008292 is the triangle of Eulerian numbers (version without zeros).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|