Skip to content

StaircaseSizeOfCode on Permutation ​

The largest k with a subsequence of the Lehmer code whose j-th entry from the right is at least j.

On Permutation

Scanning the code from the right and taking each entry that exceeds the count so far is optimal.

Called as CombinatorialStat(x, "StaircaseSizeOfCode"). The head's page has its examples.

Live

Distribution

Over SymmetricGroup at each size, tallied here in your browser; sizes past 8 are not offered.

FindStat St000662

The staircase size of the code of a permutation.

ObjectValue
[]0
[1]0
[1,2]0
[2,1]1
[1,2,3]0
[1,3,2]1
[2,1,3]1
[2,3,1]1

Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000662 has the rest.