*****************************************************************************
*       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: St001710

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

-----------------------------------------------------------------------------
Description: The number of permutations such that conjugation with a permutation of given cycle type yields the inverse permutation.

Let $\alpha$ be any permutation of cycle type $\lambda$.  This statistic is the number of permutations $\pi$ such that
$$ \alpha\pi\alpha^{-1} = \pi^{-1}.$$

-----------------------------------------------------------------------------
References: [1]   Homolya, S., Szigeti, Jenő Solving equations in the symmetric group [[arXiv:2104.03593]]

-----------------------------------------------------------------------------
Code:
def statistic(la):
    total = 0
    cycles = []
    for p in la:
        cycles.append(tuple(range(total+1, total+p+1)))
        total += p
    a = Permutation(cycles)
    return sum(1 for pi in Permutations(len(a)) if pi*a*pi == a)


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

[]                => 1
[1]               => 1
[2]               => 2
[1,1]             => 2
[3]               => 1
[2,1]             => 4
[1,1,1]           => 4
[4]               => 2
[3,1]             => 1
[2,2]             => 10
[2,1,1]           => 10
[1,1,1,1]         => 10
[5]               => 1
[4,1]             => 2
[3,2]             => 2
[3,1,1]           => 2
[2,2,1]           => 26
[2,1,1,1]         => 26
[1,1,1,1,1]       => 26
[6]               => 4
[5,1]             => 1
[4,2]             => 4
[4,1,1]           => 4
[3,3]             => 4
[3,2,1]           => 4
[3,1,1,1]         => 4
[2,2,2]           => 76
[2,2,1,1]         => 76
[2,1,1,1,1]       => 76
[1,1,1,1,1,1]     => 76
[7]               => 1
[6,1]             => 4
[5,2]             => 2
[5,1,1]           => 2
[4,3]             => 2
[4,2,1]           => 8
[4,1,1,1]         => 8
[3,3,1]           => 4
[3,2,2]           => 10
[3,2,1,1]         => 10
[3,1,1,1,1]       => 10
[2,2,2,1]         => 232
[2,2,1,1,1]       => 232
[2,1,1,1,1,1]     => 232
[1,1,1,1,1,1,1]   => 232
[8]               => 4
[7,1]             => 1
[6,2]             => 8
[6,1,1]           => 8
[5,3]             => 1
[5,2,1]           => 4
[5,1,1,1]         => 4
[4,4]             => 12
[4,3,1]           => 2
[4,2,2]           => 20
[4,2,1,1]         => 20
[4,1,1,1,1]       => 20
[3,3,2]           => 8
[3,3,1,1]         => 8
[3,2,2,1]         => 26
[3,2,1,1,1]       => 26
[3,1,1,1,1,1]     => 26
[2,2,2,2]         => 764
[2,2,2,1,1]       => 764
[2,2,1,1,1,1]     => 764
[2,1,1,1,1,1,1]   => 764
[1,1,1,1,1,1,1,1] => 764

-----------------------------------------------------------------------------
Created: Apr 09, 2021 at 11:05 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Apr 09, 2021 at 11:05 by Martin Rubey