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

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

-----------------------------------------------------------------------------
Description: The coefficient times the product of the factorials of the parts of the monomial symmetric function indexed by the partition in the formal group law for increasing trees.

For a generating function $f$ the associated formal group law is the symmetric function $f(f^{(-1)}(x_1) + f^{(-1)}(x_2), \dots)$, see [1].

This statistic records the coefficient of the monomial symmetric function $m_\lambda$ times the product of the factorials of the parts of $\lambda$ in the formal group law for increasing trees, whose generating function is $f(x) = -\log(1-x)$, see [1, sec. 9.1]

Fix a coloring of $\{1,2, \ldots, n\}$ so that $\lambda_i$ are colored with the $i$th color.  This statistic gives the number of increasing trees on this colored set of vertices so that no leaf has the same color as its parent.  (An increasing tree is a rooted tree on the vertex set $\{1,2, \ldots, n\}$ with the property that any child of $i$ is greater than $i$.)

-----------------------------------------------------------------------------
References: [1]   Taylor, J. Formal group laws and hypergraph colorings [[MathSciNet:3542357]]

-----------------------------------------------------------------------------
Code:
@cached_function
def data(n):
    R.<x> = PowerSeriesRing(SR, default_prec=n+1)
    f = -log(1-x) # increasing trees
    f_coefficients = f.list()
    f_rev = f.reverse()
    t = var('t')
    polynomials = (t*f_rev).exp().list()
    polynomials = [p.expand() for p in polynomials]
    return (f_coefficients, polynomials)

def statistic(P):
    f_coefficients, polynomials = data(P.size())
    p = SR(1)
    for i in P:
        p *= polynomials[i]
    p = p.expand()
    return (prod(factorial(e) for e in P)
	    *sum(p.coefficient(t,n) * f_coefficients[n] * factorial(n)
                 for n in range(p.degree(t)+1)).expand())


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

[2]                       => 0
[1,1]                     => 1
[3]                       => 0
[2,1]                     => 1
[1,1,1]                   => 2
[4]                       => 0
[3,1]                     => 1
[2,2]                     => 3
[2,1,1]                   => 4
[1,1,1,1]                 => 6
[5]                       => 0
[4,1]                     => 1
[3,2]                     => 7
[3,1,1]                   => 8
[2,2,1]                   => 14
[2,1,1,1]                 => 18
[1,1,1,1,1]               => 24
[6]                       => 0
[5,1]                     => 1
[4,2]                     => 15
[4,1,1]                   => 16
[3,3]                     => 31
[3,2,1]                   => 46
[3,1,1,1]                 => 54
[2,2,2]                   => 64
[2,2,1,1]                 => 78
[2,1,1,1,1]               => 96
[1,1,1,1,1,1]             => 120
[7]                       => 0
[6,1]                     => 1
[5,2]                     => 31
[5,1,1]                   => 32
[4,3]                     => 115
[4,2,1]                   => 146
[4,1,1,1]                 => 162
[3,3,1]                   => 230
[3,2,2]                   => 284
[3,2,1,1]                 => 330
[3,1,1,1,1]               => 384
[2,2,2,1]                 => 426
[2,2,1,1,1]               => 504
[2,1,1,1,1,1]             => 600
[1,1,1,1,1,1,1]           => 720
[8]                       => 0
[7,1]                     => 1
[6,2]                     => 63
[6,1,1]                   => 64
[5,3]                     => 391
[5,2,1]                   => 454
[5,1,1,1]                 => 486
[4,4]                     => 675
[4,3,1]                   => 1066
[4,2,2]                   => 1228
[4,2,1,1]                 => 1374
[4,1,1,1,1]               => 1536
[3,3,2]                   => 1672
[3,3,1,1]                 => 1902
[3,2,2,1]                 => 2286
[3,2,1,1,1]               => 2616
[3,1,1,1,1,1]             => 3000
[2,2,2,2]                 => 2790
[2,2,2,1,1]               => 3216
[2,2,1,1,1,1]             => 3720
[2,1,1,1,1,1,1]           => 4320
[1,1,1,1,1,1,1,1]         => 5040
[9]                       => 0
[8,1]                     => 1
[7,2]                     => 127
[7,1,1]                   => 128
[6,3]                     => 1267
[6,2,1]                   => 1394
[6,1,1,1]                 => 1458
[5,4]                     => 3451
[5,3,1]                   => 4718
[5,2,2]                   => 5204
[5,2,1,1]                 => 5658
[5,1,1,1,1]               => 6144
[4,4,1]                   => 6902
[4,3,2]                   => 9488
[4,3,1,1]                 => 10554
[4,2,2,1]                 => 12090
[4,2,1,1,1]               => 13464
[4,1,1,1,1,1]             => 15000
[3,3,3]                   => 11828
[3,3,2,1]                 => 15402
[3,3,1,1,1]               => 17304
[3,2,2,2]                 => 18018
[3,2,2,1,1]               => 20304
[3,2,1,1,1,1]             => 22920
[3,1,1,1,1,1,1]           => 25920
[2,2,2,2,1]               => 24024
[2,2,2,1,1,1]             => 27240
[2,2,1,1,1,1,1]           => 30960
[2,1,1,1,1,1,1,1]         => 35280
[1,1,1,1,1,1,1,1,1]       => 40320
[10]                      => 0
[9,1]                     => 1
[8,2]                     => 255
[8,1,1]                   => 256
[7,3]                     => 3991
[7,2,1]                   => 4246
[7,1,1,1]                 => 4374
[6,4]                     => 16275
[6,3,1]                   => 20266
[6,2,2]                   => 21724
[6,2,1,1]                 => 23118
[6,1,1,1,1]               => 24576
[5,5]                     => 25231
[5,4,1]                   => 41506
[5,3,2]                   => 52336
[5,3,1,1]                 => 57054
[5,2,2,1]                 => 63198
[5,2,1,1,1]               => 68856
[5,1,1,1,1,1]             => 75000
[4,4,2]                   => 69208
[4,4,1,1]                 => 76110
[4,3,3]                   => 81460
[4,3,2,1]                 => 101502
[4,3,1,1,1]               => 112056
[4,2,2,2]                 => 114966
[4,2,2,1,1]               => 127056
[4,2,1,1,1,1]             => 140520
[4,1,1,1,1,1,1]           => 155520
[3,3,3,1]                 => 122190
[3,3,2,2]                 => 139494
[3,3,2,1,1]               => 154896
[3,3,1,1,1,1]             => 172200
[3,2,2,2,1]               => 177816
[3,2,2,1,1,1]             => 198120
[3,2,1,1,1,1,1]           => 221040
[3,1,1,1,1,1,1,1]         => 246960
[2,2,2,2,2]               => 205056
[2,2,2,2,1,1]             => 229080
[2,2,2,1,1,1,1]           => 256320
[2,2,1,1,1,1,1,1]         => 287280
[2,1,1,1,1,1,1,1,1]       => 322560
[1,1,1,1,1,1,1,1,1,1]     => 362880
[11]                      => 0
[10,1]                    => 1
[9,2]                     => 511
[9,1,1]                   => 512
[8,3]                     => 12355
[8,2,1]                   => 12866
[8,1,1,1]                 => 13122
[7,4]                     => 72955
[7,3,1]                   => 85310
[7,2,2]                   => 89684
[7,2,1,1]                 => 93930
[7,1,1,1,1]               => 98304
[6,5]                     => 164731
[6,4,1]                   => 237686
[6,3,2]                   => 282464
[6,3,1,1]                 => 302730
[6,2,2,1]                 => 327306
[6,2,1,1,1]               => 350424
[6,1,1,1,1,1]             => 375000
[5,5,1]                   => 329462
[5,4,2]                   => 484136
[5,4,1,1]                 => 525642
[5,3,3]                   => 547820
[5,3,2,1]                 => 657210
[5,3,1,1,1]               => 714264
[5,2,2,2]                 => 726066
[5,2,2,1,1]               => 789264
[5,2,1,1,1,1]             => 858120
[5,1,1,1,1,1,1]           => 933120
[4,4,3]                   => 677636
[4,4,2,1]                 => 822954
[4,4,1,1,1]               => 899064
[4,3,3,1]                 => 951546
[4,3,2,2]                 => 1063602
[4,3,2,1,1]               => 1165104
[4,3,1,1,1,1]             => 1277160
[4,2,2,2,1]               => 1305624
[4,2,2,1,1,1]             => 1432680
[4,2,1,1,1,1,1]           => 1573200
[4,1,1,1,1,1,1,1]         => 1728720
[3,3,3,2]                 => 1244034
[3,3,3,1,1]               => 1366224
[3,3,2,2,1]               => 1538424
[3,3,2,1,1,1]             => 1693320
[3,3,1,1,1,1,1]           => 1865520
[3,2,2,2,2]               => 1736544
[3,2,2,2,1,1]             => 1914360
[3,2,2,1,1,1,1]           => 2112480
[3,2,1,1,1,1,1,1]         => 2333520
[3,1,1,1,1,1,1,1,1]       => 2580480
[2,2,2,2,2,1]             => 2170680
[2,2,2,2,1,1,1]           => 2399760
[2,2,2,1,1,1,1,1]         => 2656080
[2,2,1,1,1,1,1,1,1]       => 2943360
[2,1,1,1,1,1,1,1,1,1]     => 3265920
[1,1,1,1,1,1,1,1,1,1,1]   => 3628800
[12]                      => 0
[11,1]                    => 1
[10,2]                    => 1023
[10,1,1]                  => 1024
[9,3]                     => 37831
[9,2,1]                   => 38854
[9,1,1,1]                 => 39366
[8,4]                     => 316275
[8,3,1]                   => 354106
[8,2,2]                   => 367228
[8,2,1,1]                 => 380094
[8,1,1,1,1]               => 393216
[7,5]                     => 999391
[7,4,1]                   => 1315666
[7,3,2]                   => 1499152
[7,3,1,1]                 => 1584462
[7,2,2,1]                 => 1682766
[7,2,1,1,1]               => 1776696
[7,1,1,1,1,1]             => 1875000
[6,6]                     => 1441923
[6,5,1]                   => 2441314
[6,4,2]                   => 3281608
[6,4,1,1]                 => 3519294
[6,3,3]                   => 3610372
[6,3,2,1]                 => 4195566
[6,3,1,1,1]               => 4498296
[6,2,2,2]                 => 4545990
[6,2,2,1,1]               => 4873296
[6,2,1,1,1,1]             => 5223720
[6,1,1,1,1,1,1]           => 5598720
[5,5,2]                   => 4223704
[5,5,1,1]                 => 4553166
[5,4,3]                   => 5485756
[5,4,2,1]                 => 6495534
[5,4,1,1,1]               => 7021176
[5,3,3,1]                 => 7290942
[5,3,2,2]                 => 8005206
[5,3,2,1,1]               => 8662416
[5,3,1,1,1,1]             => 9376680
[5,2,2,2,1]               => 9520536
[5,2,2,1,1,1]             => 10309800
[5,2,1,1,1,1,1]           => 11167920
[5,1,1,1,1,1,1,1]         => 12101040
[4,4,4]                   => 6476644
[4,4,3,1]                 => 8724078
[4,4,2,2]                 => 9623142
[4,4,2,1,1]               => 10446096
[4,4,1,1,1,1]             => 11345160
[4,3,3,2]                 => 10942230
[4,3,3,1,1]               => 11893776
[4,3,2,2,1]               => 13170936
[4,3,2,1,1,1]             => 14336040
[4,3,1,1,1,1,1]           => 15613200
[4,2,2,2,2]               => 14603616
[4,2,2,2,1,1]             => 15909240
[4,2,2,1,1,1,1]           => 17341920
[4,2,1,1,1,1,1,1]         => 18915120
[4,1,1,1,1,1,1,1,1]       => 20643840
[3,3,3,3]                 => 12497958
[3,3,3,2,1]               => 15108216
[3,3,3,1,1,1]             => 16474440
[3,3,2,2,2]               => 16801536
[3,3,2,2,1,1]             => 18339960
[3,3,2,1,1,1,1]           => 20033280
[3,3,1,1,1,1,1,1]         => 21898800
[3,2,2,2,2,1]             => 20452440
[3,2,2,2,1,1,1]           => 22366800
[3,2,2,1,1,1,1,1]         => 24479280
[3,2,1,1,1,1,1,1,1]       => 26812800
[3,1,1,1,1,1,1,1,1,1]     => 29393280
[2,2,2,2,2,2]             => 22852200
[2,2,2,2,2,1,1]           => 25022880
[2,2,2,2,1,1,1,1]         => 27422640
[2,2,2,1,1,1,1,1,1]       => 30078720
[2,2,1,1,1,1,1,1,1,1]     => 33022080
[2,1,1,1,1,1,1,1,1,1,1]   => 36288000
[1,1,1,1,1,1,1,1,1,1,1,1] => 39916800

-----------------------------------------------------------------------------
Created: Feb 02, 2018 at 20:19 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Feb 06, 2018 at 07:24 by Jair Taylor