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.
%I A352516 #5 Mar 31 2022 03:08:03 %S A352516 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, %T A352516 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, %U A352516 2,1,1,1,2,2,1,1,1,1,1,1,2,2,2,2,1,1,1 %N A352516 Number of excedances (parts above the diagonal) of the n-th composition in standard order. %C A352516 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. %H A352516 MathOverflow, <a href="https://mathoverflow.net/questions/359684/why-excedances-of-permutations">Why 'excedances' of permutations? [closed]</a>. %e A352516 The 5392th composition in standard order is (2,2,4,5), with excedances {1,3,4}, so a(5392) = 3. %t A352516 stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; %t A352516 pd[y_]:=Length[Select[Range[Length[y]],#<y[[#]]&]]; %t A352516 Table[pd[stc[n]],{n,0,30}] %Y A352516 Positions of first appearances are A104462. %Y A352516 The opposite version is A352514, counted by A352521 (first column A219282). %Y A352516 The weak opposite version is A352515, counted by A352522 (first A238874). %Y A352516 The weak version is A352517, counted by A352525 (first column A177510). %Y A352516 The triangle A352524 counts these compositions (first column A008930). %Y A352516 A008292 is the triangle of Eulerian numbers (version without zeros). %Y A352516 A011782 counts compositions. %Y A352516 A173018 counts permutations by number of excedances, weak A123125. %Y A352516 A238349 counts comps by fixed points, first col A238351, rank stat A352512. %Y A352516 A352487 is the excedance set of A122111. %Y A352516 A352523 counts comps by unfixed points, first A010054, rank stat A352513. %Y A352516 Cf. A088218, A098825, A114088, A115994, A131577, A238352, A352513, A352523. %K A352516 nonn %O A352516 0,21 %A A352516 _Gus Wiseman_, Mar 23 2022