Identifier
- St000484: Permutations ⟶ ℤ
Values
[1] => 0
[1,2] => 0
[2,1] => 0
[1,2,3] => 1
[1,3,2] => 2
[2,1,3] => 2
[2,3,1] => 2
[3,1,2] => 2
[3,2,1] => 1
[1,2,3,4] => 5
[1,2,4,3] => 8
[1,3,2,4] => 9
[1,3,4,2] => 9
[1,4,2,3] => 10
[1,4,3,2] => 9
[2,1,3,4] => 8
[2,1,4,3] => 11
[2,3,1,4] => 10
[2,3,4,1] => 9
[2,4,1,3] => 11
[2,4,3,1] => 9
[3,1,2,4] => 9
[3,1,4,2] => 11
[3,2,1,4] => 9
[3,2,4,1] => 10
[3,4,1,2] => 11
[3,4,2,1] => 8
[4,1,2,3] => 9
[4,1,3,2] => 10
[4,2,1,3] => 9
[4,2,3,1] => 9
[4,3,1,2] => 8
[4,3,2,1] => 5
[1,2,3,4,5] => 16
[1,2,3,5,4] => 23
[1,2,4,3,5] => 26
[1,2,4,5,3] => 26
[1,2,5,3,4] => 29
[1,2,5,4,3] => 28
[1,3,2,4,5] => 26
[1,3,2,5,4] => 33
[1,3,4,2,5] => 30
[1,3,4,5,2] => 27
[1,3,5,2,4] => 33
[1,3,5,4,2] => 29
[1,4,2,3,5] => 30
[1,4,2,5,3] => 34
[1,4,3,2,5] => 32
[1,4,3,5,2] => 33
[1,4,5,2,3] => 34
[1,4,5,3,2] => 29
[1,5,2,3,4] => 31
[1,5,2,4,3] => 34
[1,5,3,2,4] => 33
[1,5,3,4,2] => 33
[1,5,4,2,3] => 32
[1,5,4,3,2] => 27
[2,1,3,4,5] => 23
[2,1,3,5,4] => 30
[2,1,4,3,5] => 33
[2,1,4,5,3] => 33
[2,1,5,3,4] => 36
[2,1,5,4,3] => 35
[2,3,1,4,5] => 29
[2,3,1,5,4] => 36
[2,3,4,1,5] => 31
[2,3,4,5,1] => 27
[2,3,5,1,4] => 34
[2,3,5,4,1] => 29
[2,4,1,3,5] => 33
[2,4,1,5,3] => 37
[2,4,3,1,5] => 33
[2,4,3,5,1] => 33
[2,4,5,1,3] => 35
[2,4,5,3,1] => 29
[2,5,1,3,4] => 34
[2,5,1,4,3] => 37
[2,5,3,1,4] => 34
[2,5,3,4,1] => 33
[2,5,4,1,3] => 33
[2,5,4,3,1] => 27
[3,1,2,4,5] => 26
[3,1,2,5,4] => 33
[3,1,4,2,5] => 34
[3,1,4,5,2] => 33
[3,1,5,2,4] => 37
[3,1,5,4,2] => 35
[3,2,1,4,5] => 28
[3,2,1,5,4] => 35
[3,2,4,1,5] => 34
[3,2,4,5,1] => 32
[3,2,5,1,4] => 37
[3,2,5,4,1] => 34
[3,4,1,2,5] => 34
[3,4,1,5,2] => 37
[3,4,2,1,5] => 32
[3,4,2,5,1] => 34
[3,4,5,1,2] => 35
[3,4,5,2,1] => 28
[3,5,1,2,4] => 35
[3,5,1,4,2] => 37
>>> Load all 1201 entries. <<<
search for individual values
searching the database for the individual values of this statistic
/
search for generating function
searching the database for statistics with the same generating function
Description
The sum of St000483 over all subsequences of length at least three.
References
[1] Ahmed, T., Snevily, H. Some properties of roller coaster permutations MathSciNet:3136863
Code
# code could be simplified...
def inc_runs(w):
"""
runs in w of length at least 2
sage: sage: pi = Permutation([2,1,4,3])
sage: inc_runs(pi)
"""
runs = []
current_value = w[0]
current_run = [w[0]]
for i in w[1:]:
if i < current_value:
if len(current_run) > 1:
runs.append(current_run)
current_run = [i]
else:
current_run.append(i)
current_value = i
if len(current_run) > 1:
runs.append(current_run)
return len(runs)
def dec_runs(w):
"""
sage: pi = Permutation([2,1,4,3])
sage: dec_runs(pi)
"""
return inc_runs(w[::-1])
def total_runs(w):
"""
sage: all(total_runs(pi)==1+pi.number_of_peaks()+pi.complement().number_of_peaks() for pi in Permutations(6))
True
"""
return inc_runs(w) + dec_runs(w)
def statistic(pi):
"""
sage: statistic([2,1,4,3])
11
sage: statistic([1,2,3,4])
5
"""
return sum([total_runs(tau) for k in range(3, len(pi)+1) for tau in Subwords(pi, k)])
Created
May 10, 2016 at 15:02 by Martin Rubey
Updated
May 10, 2019 at 17:38 by Henning Ulfarsson
searching the database
Sorry, this statistic was not found in the database
or
add this statistic to the database – it's very simple and we need your support!