Identifier
Identifier
Values
[1] generating graphics... => 1
[2] generating graphics... => 1
[1,1] generating graphics... => 1
[3] generating graphics... => 0
[2,1] generating graphics... => 1
[1,1,1] generating graphics... => 3
[4] generating graphics... => 1
[3,1] generating graphics... => 0
[2,2] generating graphics... => 1
[2,1,1] generating graphics... => 1
[1,1,1,1] generating graphics... => 9
[5] generating graphics... => 1
[4,1] generating graphics... => 1
[3,2] generating graphics... => 0
[3,1,1] generating graphics... => 0
[2,2,1] generating graphics... => 1
[2,1,1,1] generating graphics... => 3
[1,1,1,1,1] generating graphics... => 21
[6] generating graphics... => 0
[5,1] generating graphics... => 1
[4,2] generating graphics... => 1
[4,1,1] generating graphics... => 1
[3,3] generating graphics... => 0
[3,2,1] generating graphics... => 0
[3,1,1,1] generating graphics... => 0
[2,2,2] generating graphics... => 9
[2,2,1,1] generating graphics... => 1
[2,1,1,1,1] generating graphics... => 9
[1,1,1,1,1,1] generating graphics... => 81
[7] generating graphics... => 1
[6,1] generating graphics... => 0
[5,2] generating graphics... => 1
[5,1,1] generating graphics... => 1
[4,3] generating graphics... => 0
[4,2,1] generating graphics... => 1
[4,1,1,1] generating graphics... => 3
[3,3,1] generating graphics... => 0
[3,2,2] generating graphics... => 0
[3,2,1,1] generating graphics... => 0
[3,1,1,1,1] generating graphics... => 0
[2,2,2,1] generating graphics... => 9
[2,2,1,1,1] generating graphics... => 3
[2,1,1,1,1,1] generating graphics... => 21
[1,1,1,1,1,1,1] generating graphics... => 351
[8] generating graphics... => 1
[7,1] generating graphics... => 1
[6,2] generating graphics... => 0
[6,1,1] generating graphics... => 0
[5,3] generating graphics... => 0
[5,2,1] generating graphics... => 1
[5,1,1,1] generating graphics... => 3
[4,4] generating graphics... => 1
[4,3,1] generating graphics... => 0
[4,2,2] generating graphics... => 1
[4,2,1,1] generating graphics... => 1
[4,1,1,1,1] generating graphics... => 9
[3,3,2] generating graphics... => 0
[3,3,1,1] generating graphics... => 0
[3,2,2,1] generating graphics... => 0
[3,2,1,1,1] generating graphics... => 0
[3,1,1,1,1,1] generating graphics... => 0
[2,2,2,2] generating graphics... => 33
[2,2,2,1,1] generating graphics... => 9
[2,2,1,1,1,1] generating graphics... => 9
[2,1,1,1,1,1,1] generating graphics... => 81
[1,1,1,1,1,1,1,1] generating graphics... => 1233
[9] generating graphics... => 0
[8,1] generating graphics... => 1
[7,2] generating graphics... => 1
[7,1,1] generating graphics... => 1
[6,3] generating graphics... => 0
[6,2,1] generating graphics... => 0
[6,1,1,1] generating graphics... => 0
[5,4] generating graphics... => 1
[5,3,1] generating graphics... => 0
[5,2,2] generating graphics... => 1
[5,2,1,1] generating graphics... => 1
[5,1,1,1,1] generating graphics... => 9
[4,4,1] generating graphics... => 1
[4,3,2] generating graphics... => 0
[4,3,1,1] generating graphics... => 0
[4,2,2,1] generating graphics... => 1
[4,2,1,1,1] generating graphics... => 3
[4,1,1,1,1,1] generating graphics... => 21
[3,3,3] generating graphics... => 18
[3,3,2,1] generating graphics... => 0
[3,3,1,1,1] generating graphics... => 0
[3,2,2,2] generating graphics... => 0
[3,2,2,1,1] generating graphics... => 0
[3,2,1,1,1,1] generating graphics... => 0
[3,1,1,1,1,1,1] generating graphics... => 0
[2,2,2,2,1] generating graphics... => 33
[2,2,2,1,1,1] generating graphics... => 27
[2,2,1,1,1,1,1] generating graphics... => 21
[2,1,1,1,1,1,1,1] generating graphics... => 351
[1,1,1,1,1,1,1,1,1] generating graphics... => 5769
click to show generating function       
Description
The number of permutations whose cube equals a fixed permutation of given cycle type.
For example, the permutation $\pi=412365$ has cycle type $(4,2)$ and $234165$ is the unique permutation whose cube is $\pi$.
Code
@cached_function
def statistic_dict(n, k):
    d = {}
    for pi in Permutations(n):
        sigma = pi^k
        d[sigma] = d.get(sigma, 0) + 1
    return d

def statistic(la):
    n = la.size()
    d = statistic_dict(n, 3)
    sigma = standard_permutation(la)
    return d.get(sigma, 0)

Created
Mar 15, 2019 at 20:50 by Martin Rubey
Updated
Mar 15, 2019 at 20:50 by Martin Rubey