A352517 Number of weak excedances (parts on or above the diagonal) of the n-th composition in standard order.
0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2
Offset: 0
Keywords
Examples
The 169th composition in standard order is (2,2,3,1), with weak excedances {1,2,3}, so a(169) = 3.
Links
- MathOverflow, Why 'excedances' of permutations? [closed].
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; pdw[y_]:=Length[Select[Range[Length[y]],#<=y[[#]]&]]; Table[pdw[stc[n]],{n,0,30}]
Comments