Identifier
Identifier
Values
[] generating graphics... => 0
[1] generating graphics... => -1
[2] generating graphics... => 1
[1,1] generating graphics... => -2
[3] generating graphics... => 1
[2,1] generating graphics... => 0
[1,1,1] generating graphics... => -3
[4] generating graphics... => 1
[3,1] generating graphics... => 0
[2,2] generating graphics... => 2
[2,1,1] generating graphics... => -2
[1,1,1,1] generating graphics... => -4
[5] generating graphics... => 1
[4,1] generating graphics... => 0
[3,2] generating graphics... => 2
[3,1,1] generating graphics... => -1
[2,2,1] generating graphics... => 1
[2,1,1,1] generating graphics... => -3
[1,1,1,1,1] generating graphics... => -5
[6] generating graphics... => 1
[5,1] generating graphics... => 0
[4,2] generating graphics... => 2
[4,1,1] generating graphics... => -1
[3,3] generating graphics... => 2
[3,2,1] generating graphics... => 1
[3,1,1,1] generating graphics... => -3
[2,2,2] generating graphics... => 3
[2,2,1,1] generating graphics... => -2
[2,1,1,1,1] generating graphics... => -4
[1,1,1,1,1,1] generating graphics... => -6
[7] generating graphics... => 1
[6,1] generating graphics... => 0
[5,2] generating graphics... => 2
[5,1,1] generating graphics... => -1
[4,3] generating graphics... => 2
[4,2,1] generating graphics... => 1
[4,1,1,1] generating graphics... => -2
[3,3,1] generating graphics... => 1
[3,2,2] generating graphics... => 3
[3,2,1,1] generating graphics... => -1
[3,1,1,1,1] generating graphics... => -4
[2,2,2,1] generating graphics... => 2
[2,2,1,1,1] generating graphics... => -3
[2,1,1,1,1,1] generating graphics... => -5
[1,1,1,1,1,1,1] generating graphics... => -7
[8] generating graphics... => 1
[7,1] generating graphics... => 0
[6,2] generating graphics... => 2
[6,1,1] generating graphics... => -1
[5,3] generating graphics... => 2
[5,2,1] generating graphics... => 1
[5,1,1,1] generating graphics... => -2
[4,4] generating graphics... => 2
[4,3,1] generating graphics... => 1
[4,2,2] generating graphics... => 3
[4,2,1,1] generating graphics... => -1
[4,1,1,1,1] generating graphics... => -4
[3,3,2] generating graphics... => 3
[3,3,1,1] generating graphics... => 0
[3,2,2,1] generating graphics... => 2
[3,2,1,1,1] generating graphics... => -3
[3,1,1,1,1,1] generating graphics... => -5
[2,2,2,2] generating graphics... => 4
[2,2,2,1,1] generating graphics... => -2
[2,2,1,1,1,1] generating graphics... => -4
[2,1,1,1,1,1,1] generating graphics... => -6
[1,1,1,1,1,1,1,1] generating graphics... => -8
[9] generating graphics... => 1
[8,1] generating graphics... => 0
[7,2] generating graphics... => 2
[7,1,1] generating graphics... => -1
[6,3] generating graphics... => 2
[6,2,1] generating graphics... => 1
[6,1,1,1] generating graphics... => -2
[5,4] generating graphics... => 2
[5,3,1] generating graphics... => 1
[5,2,2] generating graphics... => 3
[5,2,1,1] generating graphics... => -1
[5,1,1,1,1] generating graphics... => -3
[4,4,1] generating graphics... => 1
[4,3,2] generating graphics... => 3
[4,3,1,1] generating graphics... => 0
[4,2,2,1] generating graphics... => 2
[4,2,1,1,1] generating graphics... => -2
[4,1,1,1,1,1] generating graphics... => -5
[3,3,3] generating graphics... => 3
[3,3,2,1] generating graphics... => 2
[3,3,1,1,1] generating graphics... => -3
[3,2,2,2] generating graphics... => 4
[3,2,2,1,1] generating graphics... => -1
[3,2,1,1,1,1] generating graphics... => -4
[3,1,1,1,1,1,1] generating graphics... => -6
[2,2,2,2,1] generating graphics... => 3
[2,2,2,1,1,1] generating graphics... => -3
[2,2,1,1,1,1,1] generating graphics... => -5
[2,1,1,1,1,1,1,1] generating graphics... => -7
[1,1,1,1,1,1,1,1,1] generating graphics... => -9
[10] generating graphics... => 1
[9,1] generating graphics... => 0
[8,2] generating graphics... => 2
[8,1,1] generating graphics... => -1
[7,3] generating graphics... => 2
[7,2,1] generating graphics... => 1
[7,1,1,1] generating graphics... => -2
[6,4] generating graphics... => 2
[6,3,1] generating graphics... => 1
[6,2,2] generating graphics... => 3
[6,2,1,1] generating graphics... => -1
[6,1,1,1,1] generating graphics... => -3
[5,5] generating graphics... => 2
[5,4,1] generating graphics... => 1
[5,3,2] generating graphics... => 3
[5,3,1,1] generating graphics... => 0
[5,2,2,1] generating graphics... => 2
[5,2,1,1,1] generating graphics... => -2
[5,1,1,1,1,1] generating graphics... => -5
[4,4,2] generating graphics... => 3
[4,4,1,1] generating graphics... => 0
[4,3,3] generating graphics... => 3
[4,3,2,1] generating graphics... => 2
[4,3,1,1,1] generating graphics... => -2
[4,2,2,2] generating graphics... => 4
[4,2,2,1,1] generating graphics... => -1
[4,2,1,1,1,1] generating graphics... => -4
[4,1,1,1,1,1,1] generating graphics... => -6
[3,3,3,1] generating graphics... => 2
[3,3,2,2] generating graphics... => 4
[3,3,2,1,1] generating graphics... => 0
[3,3,1,1,1,1] generating graphics... => -4
[3,2,2,2,1] generating graphics... => 3
[3,2,2,1,1,1] generating graphics... => -3
[3,2,1,1,1,1,1] generating graphics... => -5
[3,1,1,1,1,1,1,1] generating graphics... => -7
[2,2,2,2,2] generating graphics... => 5
[2,2,2,2,1,1] generating graphics... => -2
[2,2,2,1,1,1,1] generating graphics... => -4
[2,2,1,1,1,1,1,1] generating graphics... => -6
[2,1,1,1,1,1,1,1,1] generating graphics... => -8
[1,1,1,1,1,1,1,1,1,1] generating graphics... => -10
click to show generating function       
Description
The Andrews-Garvan crank of a partition.
If $\pi$ is a partition, let $l(\pi)$ be its length (number of parts), $\omega(\pi)$ be the number of parts equal to 1, and $\mu(\pi)$ be the number of parts larger than $\omega(\pi)$. The crank is then defined by
$$ c(\pi) = \begin{cases} l(\pi) &\text{if \(\omega(\pi)=0\)}\\ \mu(\pi) - \omega(\pi) &\text{otherwise}. \end{cases} $$
This statistic was defined in [1] to explain Ramanujan's partition congruence $$p(11n+6) \equiv 0 \pmod{11}$$ in the same way as the Dyson rank (St000145The Dyson rank of a partition.) explains the congruences $$p(5n+4) \equiv 0 \pmod{5}$$ and $$p(7n+5) \equiv 0 \pmod{7}.$$
References
[1] Andrews, G. E., Garvan, F. G. Dyson's crank of a partition MathSciNet:0929094
[2] wikipedia:Ramanujan's congruences
Code
def statistic(p):
    nb_ones = p.to_list().count(1)
    if nb_ones == 0:
        return len(p)
    else:
        return len([i for i in p if i > nb_ones]) - nb_ones
Created
Jul 05, 2013 at 14:36 by Olivier Mallet
Updated
Oct 29, 2017 at 16:49 by Martin Rubey