*****************************************************************************
*       www.FindStat.org - The Combinatorial Statistic Finder               *
*                                                                           *
*       Copyright (C) 2019 The FindStatCrew <info@findstat.org>             *
*                                                                           *
*    This information is distributed in the hope that it will be useful,    *
*    but WITHOUT ANY WARRANTY; without even the implied warranty of         *
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                   *
*****************************************************************************

-----------------------------------------------------------------------------
Statistic identifier: St000937

-----------------------------------------------------------------------------
Collection: Integer partitions

-----------------------------------------------------------------------------
Description: The number of positive values of the symmetric group character corresponding to the partition.

For example, the character values of the irreducible representation $S^{(2,2)}$ are $2$ on the conjugacy classes $(4)$ and $(2,2)$, $0$ on the conjugacy classes $(3,1)$ and $(1,1,1,1)$, and $-1$ on the conjugacy class $(2,1,1)$.  Therefore, the statistic on the partition $(2,2)$ is $2$.


-----------------------------------------------------------------------------
References: [1]   Miller, A. R. Note on parity and the irreducible characters of the symmetric group [[arXiv:1708.03267]]

-----------------------------------------------------------------------------
Code:
@cached_function
def table(n):
    s = SymmetricFunctions(ZZ).s()
    p = SymmetricFunctions(ZZ).p()
    res = dict()
    P = Partitions(n)
    r = P.cardinality()
    for mu in P:
        res[mu] = [0]*r
    for i, la in enumerate(P):
        for mu, v in s(p(la)):
            res[mu][i] = v
    return res

def statistic(la):
    t = table(la.size())
    return len([1 for e in t[la] if e > 0])


-----------------------------------------------------------------------------
Statistic values:

[2]                       => 2
[1,1]                     => 1
[3]                       => 3
[2,1]                     => 1
[1,1,1]                   => 2
[4]                       => 5
[3,1]                     => 2
[2,2]                     => 2
[2,1,1]                   => 2
[1,1,1,1]                 => 3
[5]                       => 7
[4,1]                     => 3
[3,2]                     => 4
[3,1,1]                   => 2
[2,2,1]                   => 3
[2,1,1,1]                 => 3
[1,1,1,1,1]               => 4
[6]                       => 11
[5,1]                     => 5
[4,2]                     => 5
[4,1,1]                   => 5
[3,3]                     => 5
[3,2,1]                   => 2
[3,1,1,1]                 => 5
[2,2,2]                   => 5
[2,2,1,1]                 => 4
[2,1,1,1,1]               => 5
[1,1,1,1,1,1]             => 6
[7]                       => 15
[6,1]                     => 7
[5,2]                     => 7
[5,1,1]                   => 6
[4,3]                     => 6
[4,2,1]                   => 5
[4,1,1,1]                 => 4
[3,3,1]                   => 7
[3,2,2]                   => 7
[3,2,1,1]                 => 5
[3,1,1,1,1]               => 5
[2,2,2,1]                 => 5
[2,2,1,1,1]               => 5
[2,1,1,1,1,1]             => 6
[1,1,1,1,1,1,1]           => 8
[8]                       => 22
[7,1]                     => 11
[6,2]                     => 12
[6,1,1]                   => 9
[5,3]                     => 11
[5,2,1]                   => 5
[5,1,1,1]                 => 10
[4,4]                     => 9
[4,3,1]                   => 8
[4,2,2]                   => 8
[4,2,1,1]                 => 3
[4,1,1,1,1]               => 8
[3,3,2]                   => 5
[3,3,1,1]                 => 6
[3,2,2,1]                 => 7
[3,2,1,1,1]               => 5
[3,1,1,1,1,1]             => 9
[2,2,2,2]                 => 8
[2,2,2,1,1]               => 9
[2,2,1,1,1,1]             => 8
[2,1,1,1,1,1,1]           => 9
[1,1,1,1,1,1,1,1]         => 12
[9]                       => 30
[8,1]                     => 15
[7,2]                     => 16
[7,1,1]                   => 13
[6,3]                     => 11
[6,2,1]                   => 10
[6,1,1,1]                 => 13
[5,4]                     => 12
[5,3,1]                   => 7
[5,2,2]                   => 9
[5,2,1,1]                 => 12
[5,1,1,1,1]               => 6
[4,4,1]                   => 11
[4,3,2]                   => 10
[4,3,1,1]                 => 10
[4,2,2,1]                 => 9
[4,2,1,1,1]               => 10
[4,1,1,1,1,1]             => 12
[3,3,3]                   => 7
[3,3,2,1]                 => 11
[3,3,1,1,1]               => 7
[3,2,2,2]                 => 12
[3,2,2,1,1]               => 7
[3,2,1,1,1,1]             => 13
[3,1,1,1,1,1,1]           => 12
[2,2,2,2,1]               => 11
[2,2,2,1,1,1]             => 9
[2,2,1,1,1,1,1]           => 11
[2,1,1,1,1,1,1,1]         => 12
[1,1,1,1,1,1,1,1,1]       => 16
[10]                      => 42
[9,1]                     => 22
[8,2]                     => 24
[8,1,1]                   => 17
[7,3]                     => 18
[7,2,1]                   => 11
[7,1,1,1]                 => 21
[6,4]                     => 19
[6,3,1]                   => 16
[6,2,2]                   => 17
[6,2,1,1]                 => 13
[6,1,1,1,1]               => 16
[5,5]                     => 15
[5,4,1]                   => 11
[5,3,2]                   => 14
[5,3,1,1]                 => 9
[5,2,2,1]                 => 14
[5,2,1,1,1]               => 6
[5,1,1,1,1,1]             => 16
[4,4,2]                   => 16
[4,4,1,1]                 => 15
[4,3,3]                   => 14
[4,3,2,1]                 => 4
[4,3,1,1,1]               => 13
[4,2,2,2]                 => 15
[4,2,2,1,1]               => 10
[4,2,1,1,1,1]             => 13
[4,1,1,1,1,1,1]           => 13
[3,3,3,1]                 => 16
[3,3,2,2]                 => 15
[3,3,2,1,1]               => 15
[3,3,1,1,1,1]             => 14
[3,2,2,2,1]               => 11
[3,2,2,1,1,1]             => 17
[3,2,1,1,1,1,1]           => 11
[3,1,1,1,1,1,1,1]         => 16
[2,2,2,2,2]               => 17
[2,2,2,2,1,1]             => 16
[2,2,2,1,1,1,1]           => 15
[2,2,1,1,1,1,1,1]         => 15
[2,1,1,1,1,1,1,1,1]       => 18
[1,1,1,1,1,1,1,1,1,1]     => 22
[11]                      => 56
[10,1]                    => 30
[9,2]                     => 33
[9,1,1]                   => 24
[8,3]                     => 27
[8,2,1]                   => 19
[8,1,1,1]                 => 25
[7,4]                     => 33
[7,3,1]                   => 18
[7,2,2]                   => 24
[7,2,1,1]                 => 15
[7,1,1,1,1]               => 23
[6,5]                     => 21
[6,4,1]                   => 20
[6,3,2]                   => 18
[6,3,1,1]                 => 13
[6,2,2,1]                 => 14
[6,2,1,1,1]               => 19
[6,1,1,1,1,1]             => 12
[5,5,1]                   => 22
[5,4,2]                   => 17
[5,4,1,1]                 => 24
[5,3,3]                   => 21
[5,3,2,1]                 => 20
[5,3,1,1,1]               => 21
[5,2,2,2]                 => 16
[5,2,2,1,1]               => 21
[5,2,1,1,1,1]             => 22
[5,1,1,1,1,1,1]           => 20
[4,4,3]                   => 22
[4,4,2,1]                 => 19
[4,4,1,1,1]               => 15
[4,3,3,1]                 => 9
[4,3,2,2]                 => 19
[4,3,2,1,1]               => 18
[4,3,1,1,1,1]             => 14
[4,2,2,2,1]               => 20
[4,2,2,1,1,1]             => 14
[4,2,1,1,1,1,1]           => 14
[4,1,1,1,1,1,1,1]         => 21
[3,3,3,2]                 => 20
[3,3,3,1,1]               => 20
[3,3,2,2,1]               => 14
[3,3,2,1,1,1]             => 18
[3,3,1,1,1,1,1]           => 19
[3,2,2,2,2]               => 22
[3,2,2,2,1,1]             => 21
[3,2,2,1,1,1,1]           => 17
[3,2,1,1,1,1,1,1]         => 20
[3,1,1,1,1,1,1,1,1]       => 22
[2,2,2,2,2,1]             => 20
[2,2,2,2,1,1,1]           => 25
[2,2,2,1,1,1,1,1]         => 21
[2,2,1,1,1,1,1,1,1]       => 21
[2,1,1,1,1,1,1,1,1,1]     => 23
[1,1,1,1,1,1,1,1,1,1,1]   => 29
[12]                      => 77
[11,1]                    => 42
[10,2]                    => 46
[10,1,1]                  => 34
[9,3]                     => 40
[9,2,1]                   => 22
[9,1,1,1]                 => 37
[8,4]                     => 36
[8,3,1]                   => 25
[8,2,2]                   => 33
[8,2,1,1]                 => 31
[8,1,1,1,1]               => 31
[7,5]                     => 35
[7,4,1]                   => 19
[7,3,2]                   => 24
[7,3,1,1]                 => 29
[7,2,2,1]                 => 24
[7,2,1,1,1]               => 20
[7,1,1,1,1,1]             => 31
[6,6]                     => 29
[6,5,1]                   => 30
[6,4,2]                   => 17
[6,4,1,1]                 => 27
[6,3,3]                   => 24
[6,3,2,1]                 => 11
[6,3,1,1,1]               => 20
[6,2,2,2]                 => 24
[6,2,2,1,1]               => 19
[6,2,1,1,1,1]             => 13
[6,1,1,1,1,1,1]           => 26
[5,5,2]                   => 26
[5,5,1,1]                 => 26
[5,4,3]                   => 23
[5,4,2,1]                 => 22
[5,4,1,1,1]               => 19
[5,3,3,1]                 => 27
[5,3,2,2]                 => 21
[5,3,2,1,1]               => 12
[5,3,1,1,1,1]             => 19
[5,2,2,2,1]               => 20
[5,2,2,1,1,1]             => 18
[5,2,1,1,1,1,1]           => 20
[5,1,1,1,1,1,1,1]         => 29
[4,4,4]                   => 30
[4,4,3,1]                 => 26
[4,4,2,2]                 => 13
[4,4,2,1,1]               => 19
[4,4,1,1,1,1]             => 20
[4,3,3,2]                 => 26
[4,3,3,1,1]               => 25
[4,3,2,2,1]               => 22
[4,3,2,1,1,1]             => 11
[4,3,1,1,1,1,1]           => 24
[4,2,2,2,2]               => 25
[4,2,2,2,1,1]             => 26
[4,2,2,1,1,1,1]           => 25
[4,2,1,1,1,1,1,1]         => 30
[4,1,1,1,1,1,1,1,1]       => 30
[3,3,3,3]                 => 27
[3,3,3,2,1]               => 23
[3,3,3,1,1,1]             => 25
[3,3,2,2,2]               => 23
[3,3,2,2,1,1]             => 17
[3,3,2,1,1,1,1]           => 22
[3,3,1,1,1,1,1,1]         => 28
[3,2,2,2,2,1]             => 31
[3,2,2,2,1,1,1]           => 19
[3,2,2,1,1,1,1,1]         => 24
[3,2,1,1,1,1,1,1,1]       => 23
[3,1,1,1,1,1,1,1,1,1]     => 30
[2,2,2,2,2,2]             => 29
[2,2,2,2,2,1,1]           => 31
[2,2,2,2,1,1,1,1]         => 27
[2,2,2,1,1,1,1,1,1]       => 30
[2,2,1,1,1,1,1,1,1,1]     => 29
[2,1,1,1,1,1,1,1,1,1,1]   => 32
[1,1,1,1,1,1,1,1,1,1,1,1] => 40

-----------------------------------------------------------------------------
Created: Aug 11, 2017 at 23:10 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Aug 11, 2017 at 23:10 by Martin Rubey