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

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

-----------------------------------------------------------------------------
Description: The number of conjugacy classes of subgroups with connected subgroups of sizes prescribed by an integer partition.

Equivalently, given an integer partition $\lambda$, this is the number of molecular combinatorial species that decompose into a product of atomic species of sizes $\lambda_1,\lambda_2,\dots$.  In particular, the value on the partition $(n)$ is the number of atomic species of degree $n$, [2].

-----------------------------------------------------------------------------
References: [1]   Naughton, L., Pfeiffer, G. Integer Sequences Realized by the Subgroup Pattern of the Symmetric Group [[arXiv:1211.1911]]
[2]   Number of atomic species of degree n; also number of connected permutation groups of degree n. [[OEIS:A005226]]

-----------------------------------------------------------------------------
Code:
@cached_function
def conjugacy_classes_subgroups(n):
    if n == 1:
        return 1
    return len(SymmetricGroup(n).conjugacy_classes_subgroups())

def statistic(la):
    def aux(n):
        return n*conjugacy_classes_subgroups(n) - sum(aux(k)*conjugacy_classes_subgroups(n-k) for k in range(1,n))
        
    def connected(n):
        return sum(moebius(n//d)*aux(d) for d in divisors(n))//n

    return prod(connected(n) for n in la)


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

[]                    => 1
[1]                   => 1
[2]                   => 1
[1,1]                 => 1
[3]                   => 2
[2,1]                 => 1
[1,1,1]               => 1
[4]                   => 6
[3,1]                 => 2
[2,2]                 => 1
[2,1,1]               => 1
[1,1,1,1]             => 1
[5]                   => 6
[4,1]                 => 6
[3,2]                 => 2
[3,1,1]               => 2
[2,2,1]               => 1
[2,1,1,1]             => 1
[1,1,1,1,1]           => 1
[6]                   => 27
[5,1]                 => 6
[4,2]                 => 6
[4,1,1]               => 6
[3,3]                 => 4
[3,2,1]               => 2
[3,1,1,1]             => 2
[2,2,2]               => 1
[2,2,1,1]             => 1
[2,1,1,1,1]           => 1
[1,1,1,1,1,1]         => 1
[7]                   => 20
[6,1]                 => 27
[5,2]                 => 6
[5,1,1]               => 6
[4,3]                 => 12
[4,2,1]               => 6
[4,1,1,1]             => 6
[3,3,1]               => 4
[3,2,2]               => 2
[3,2,1,1]             => 2
[3,1,1,1,1]           => 2
[2,2,2,1]             => 1
[2,2,1,1,1]           => 1
[2,1,1,1,1,1]         => 1
[1,1,1,1,1,1,1]       => 1
[8]                   => 130
[7,1]                 => 20
[6,2]                 => 27
[6,1,1]               => 27
[5,3]                 => 12
[5,2,1]               => 6
[5,1,1,1]             => 6
[4,4]                 => 36
[4,3,1]               => 12
[4,2,2]               => 6
[4,2,1,1]             => 6
[4,1,1,1,1]           => 6
[3,3,2]               => 4
[3,3,1,1]             => 4
[3,2,2,1]             => 2
[3,2,1,1,1]           => 2
[3,1,1,1,1,1]         => 2
[2,2,2,2]             => 1
[2,2,2,1,1]           => 1
[2,2,1,1,1,1]         => 1
[2,1,1,1,1,1,1]       => 1
[1,1,1,1,1,1,1,1]     => 1
[9]                   => 124
[8,1]                 => 130
[7,2]                 => 20
[7,1,1]               => 20
[6,3]                 => 54
[6,2,1]               => 27
[6,1,1,1]             => 27
[5,4]                 => 36
[5,3,1]               => 12
[5,2,2]               => 6
[5,2,1,1]             => 6
[5,1,1,1,1]           => 6
[4,4,1]               => 36
[4,3,2]               => 12
[4,3,1,1]             => 12
[4,2,2,1]             => 6
[4,2,1,1,1]           => 6
[4,1,1,1,1,1]         => 6
[3,3,3]               => 8
[3,3,2,1]             => 4
[3,3,1,1,1]           => 4
[3,2,2,2]             => 2
[3,2,2,1,1]           => 2
[3,2,1,1,1,1]         => 2
[3,1,1,1,1,1,1]       => 2
[2,2,2,2,1]           => 1
[2,2,2,1,1,1]         => 1
[2,2,1,1,1,1,1]       => 1
[2,1,1,1,1,1,1,1]     => 1
[1,1,1,1,1,1,1,1,1]   => 1
[10]                  => 598
[9,1]                 => 124
[8,2]                 => 130
[8,1,1]               => 130
[7,3]                 => 40
[7,2,1]               => 20
[7,1,1,1]             => 20
[6,4]                 => 162
[6,3,1]               => 54
[6,2,2]               => 27
[6,2,1,1]             => 27
[6,1,1,1,1]           => 27
[5,5]                 => 36
[5,4,1]               => 36
[5,3,2]               => 12
[5,3,1,1]             => 12
[5,2,2,1]             => 6
[5,2,1,1,1]           => 6
[5,1,1,1,1,1]         => 6
[4,4,2]               => 36
[4,4,1,1]             => 36
[4,3,3]               => 24
[4,3,2,1]             => 12
[4,3,1,1,1]           => 12
[4,2,2,2]             => 6
[4,2,2,1,1]           => 6
[4,2,1,1,1,1]         => 6
[4,1,1,1,1,1,1]       => 6
[3,3,3,1]             => 8
[3,3,2,2]             => 4
[3,3,2,1,1]           => 4
[3,3,1,1,1,1]         => 4
[3,2,2,2,1]           => 2
[3,2,2,1,1,1]         => 2
[3,2,1,1,1,1,1]       => 2
[3,1,1,1,1,1,1,1]     => 2
[2,2,2,2,2]           => 1
[2,2,2,2,1,1]         => 1
[2,2,2,1,1,1,1]       => 1
[2,2,1,1,1,1,1,1]     => 1
[2,1,1,1,1,1,1,1,1]   => 1
[1,1,1,1,1,1,1,1,1,1] => 1

-----------------------------------------------------------------------------
Created: Apr 22, 2019 at 20:05 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Apr 22, 2019 at 20:05 by Martin Rubey