Identifier
Identifier
Values
[] generating graphics... => 1
[1] generating graphics... => 1
[2] generating graphics... => 1
[1,1] generating graphics... => 1
[3] generating graphics... => 1
[2,1] generating graphics... => 4
[1,1,1] generating graphics... => 1
[4] generating graphics... => 1
[3,1] generating graphics... => 7
[2,2] generating graphics... => 4
[2,1,1] generating graphics... => 11
[1,1,1,1] generating graphics... => 1
[5] generating graphics... => 1
[4,1] generating graphics... => 11
[3,2] generating graphics... => 15
[3,1,1] generating graphics... => 32
[2,2,1] generating graphics... => 34
[2,1,1,1] generating graphics... => 26
[1,1,1,1,1] generating graphics... => 1
[6] generating graphics... => 1
[5,1] generating graphics... => 16
[4,2] generating graphics... => 26
[4,1,1] generating graphics... => 76
[3,3] generating graphics... => 15
[3,2,1] generating graphics... => 192
[3,1,1,1] generating graphics... => 122
[2,2,2] generating graphics... => 34
[2,2,1,1] generating graphics... => 180
[2,1,1,1,1] generating graphics... => 57
[1,1,1,1,1,1] generating graphics... => 1
[7] generating graphics... => 1
[6,1] generating graphics... => 22
[5,2] generating graphics... => 42
[5,1,1] generating graphics... => 156
[4,3] generating graphics... => 56
[4,2,1] generating graphics... => 474
[4,1,1,1] generating graphics... => 426
[3,3,1] generating graphics... => 267
[3,2,2] generating graphics... => 294
[3,2,1,1] generating graphics... => 1494
[3,1,1,1,1] generating graphics... => 423
[2,2,2,1] generating graphics... => 496
[2,2,1,1,1] generating graphics... => 768
[2,1,1,1,1,1] generating graphics... => 120
[1,1,1,1,1,1,1] generating graphics... => 1
[8] generating graphics... => 1
[7,1] generating graphics... => 29
[6,2] generating graphics... => 64
[6,1,1] generating graphics... => 288
[5,3] generating graphics... => 98
[5,2,1] generating graphics... => 1038
[5,1,1,1] generating graphics... => 1206
[4,4] generating graphics... => 56
[4,3,1] generating graphics... => 1344
[4,2,2] generating graphics... => 768
[4,2,1,1] generating graphics... => 5142
[4,1,1,1,1] generating graphics... => 2127
[3,3,2] generating graphics... => 855
[3,3,1,1] generating graphics... => 2829
[3,2,2,1] generating graphics... => 5946
[3,2,1,1,1] generating graphics... => 9204
[3,1,1,1,1,1] generating graphics... => 1389
[2,2,2,2] generating graphics... => 496
[2,2,2,1,1] generating graphics... => 4288
[2,2,1,1,1,1] generating graphics... => 2904
[2,1,1,1,1,1,1] generating graphics... => 247
[1,1,1,1,1,1,1,1] generating graphics... => 1
[9] generating graphics... => 1
[8,1] generating graphics... => 37
[7,2] generating graphics... => 93
[7,1,1] generating graphics... => 491
[6,3] generating graphics... => 162
[6,2,1] generating graphics... => 2062
[6,1,1,1] generating graphics... => 2934
[5,4] generating graphics... => 210
[5,3,1] generating graphics... => 3068
[5,2,2] generating graphics... => 1806
[5,2,1,1] generating graphics... => 14988
[5,1,1,1,1] generating graphics... => 8157
[4,4,1] generating graphics... => 1736
[4,3,2] generating graphics... => 4590
[4,3,1,1] generating graphics... => 18864
[4,2,2,1] generating graphics... => 20838
[4,2,1,1,1] generating graphics... => 43422
[4,1,1,1,1,1] generating graphics... => 9897
[3,3,3] generating graphics... => 855
[3,3,2,1] generating graphics... => 22680
[3,3,1,1,1] generating graphics... => 23349
[3,2,2,2] generating graphics... => 7930
[3,2,2,1,1] generating graphics... => 70206
[3,2,1,1,1,1] generating graphics... => 49569
[3,1,1,1,1,1,1] generating graphics... => 4414
[2,2,2,2,1] generating graphics... => 11056
[2,2,2,1,1,1] generating graphics... => 28768
[2,2,1,1,1,1,1] generating graphics... => 10194
[2,1,1,1,1,1,1,1] generating graphics... => 502
[1,1,1,1,1,1,1,1,1] generating graphics... => 1
[10] generating graphics... => 1
[9,1] generating graphics... => 46
[8,2] generating graphics... => 130
[8,1,1] generating graphics... => 787
[7,3] generating graphics... => 255
[7,2,1] generating graphics... => 3788
[7,1,1,1] generating graphics... => 6371
[6,4] generating graphics... => 372
[6,3,1] generating graphics... => 6426
[6,2,2] generating graphics... => 3868
[6,2,1,1] generating graphics... => 38224
[6,1,1,1,1] generating graphics... => 25761
[5,5] generating graphics... => 210
[5,4,1] generating graphics... => 8220
[5,3,2] generating graphics... => 11270
[5,3,1,1] generating graphics... => 55328
[5,2,2,1] generating graphics... => 63456
[5,2,1,1,1] generating graphics... => 165978
[5,1,1,1,1,1] generating graphics... => 50682
[4,4,2] generating graphics... => 6326
[4,4,1,1] generating graphics... => 31016
[4,3,3] generating graphics... => 7155
[4,3,2,1] generating graphics... => 156894
[4,3,1,1,1] generating graphics... => 203304
[4,2,2,2] generating graphics... => 28768
[4,2,2,1,1] generating graphics... => 325500
[4,2,1,1,1,1] generating graphics... => 316164
[4,1,1,1,1,1,1] generating graphics... => 44002
[3,3,3,1] generating graphics... => 28665
[3,3,2,2] generating graphics... => 46470
[3,3,2,1,1] generating graphics... => 346539
[3,3,1,1,1,1] generating graphics... => 166314
[3,2,2,2,1] generating graphics... => 232216
[3,2,2,1,1,1] generating graphics... => 635610
[3,2,1,1,1,1,1] generating graphics... => 245148
[3,1,1,1,1,1,1,1] generating graphics... => 13744
[2,2,2,2,2] generating graphics... => 11056
[2,2,2,2,1,1] generating graphics... => 141584
[2,2,2,1,1,1,1] generating graphics... => 166042
[2,2,1,1,1,1,1,1] generating graphics... => 34096
[2,1,1,1,1,1,1,1,1] generating graphics... => 1013
[1,1,1,1,1,1,1,1,1,1] generating graphics... => 1
click to show generating function       
Description
Number of permutations whose sorted list of non zero multiplicities of the Lehmer code is the given partition.
References
[1] Hivert, F., Novelli, J.-C., Thibon, J.-Y. Multivariate generalizations of the Foata-Sch├╝tzenberger equidistribution MathSciNet:2509639 arXiv:math/0605060
Code
import collections
def part_of_perm(p):
    c = p.to_lehmer_code()
    return Partition(sorted([c.count(i) for i in range(len(p)) if i in c])[::-1])

@cached_function
def stat(N):
    res = collections.defaultdict(int)
    for p in Permutations(N):
        res[part_of_perm(p)] += 1
    return dict(res)

def statistic(L):
    return stat(L.size())[L]
Created
Sep 04, 2015 at 17:58 by Florent Hivert
Updated
Sep 15, 2015 at 15:49 by Christian Stump