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

-----------------------------------------------------------------------------
Collection: Finite Cartan types

-----------------------------------------------------------------------------
Description: The number of even entries in the character table of the Weyl group of a Cartan type.

-----------------------------------------------------------------------------
References: 

-----------------------------------------------------------------------------
Code:
def character_table(ct):
    G = WeylGroup(ct, implementation="permutation").gap()
    m = matrix([r.ValuesOfClassFunction().sage() for r in G.Irr()])
    return m

def statistic(ct):
    return sum(1 for e in character_table(ct).list() if is_even(e))

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

['A',1] => 0
['A',2] => 2
['B',2] => 5
['G',2] => 8
['A',3] => 6
['B',3] => 24
['C',3] => 24
['A',4] => 16
['B',4] => 224
['C',4] => 224
['D',4] => 69
['F',4] => 381
['A',5] => 44
['B',5] => 652
['C',5] => 652
['D',5] => 163
['A',6] => 90
['B',6] => 2165
['C',6] => 2165
['D',6] => 741
['E',6] => 372
['A',7] => 266
['B',7] => 6312
['C',7] => 6312
['D',7] => 1578
['E',7] => 1908
['A',8] => 508
['B',8] => 25761
['C',8] => 25761
['D',8] => 7304
['E',8] => 9108

-----------------------------------------------------------------------------
Created: Nov 29, 2021 at 10:57 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Nov 29, 2021 at 10:57 by Martin Rubey