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

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

-----------------------------------------------------------------------------
Description: The number of involutions in the Weyl group of a given Cartan type.

For type $A_n$, the generating function is $\exp(x+x^2/2)$, for type $BC_n$ it is $\exp(x^2+2x)$ and for type $D_n$ it is $\exp(x^2)(\exp(2x)+1)/2$.

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

-----------------------------------------------------------------------------
Code:
def statistic(C):
    return sum(1 for x in WeylGroup(C) if x == x.inverse())

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

['A',1] => 2
['A',2] => 4
['B',2] => 6
['G',2] => 8
['A',3] => 10
['B',3] => 20
['C',3] => 20
['A',4] => 26
['B',4] => 76
['C',4] => 76
['D',4] => 44
['F',4] => 140
['A',5] => 76
['B',5] => 312
['C',5] => 312
['D',5] => 156
['A',6] => 232
['B',6] => 1384
['C',6] => 1384
['D',6] => 752

-----------------------------------------------------------------------------
Created: Sep 02, 2019 at 14:20 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Sep 02, 2019 at 14:20 by Martin Rubey