Given a classical Weyl group W, that is, a Weyl group of type A, B or D, one can associate with it a polynomial with integral coefficients ZW given by the ratio of the Hilbert series of the invariant algebras of the natural action of W and Wt on the ring of polynomials C [ x 1 , ⊠, x n ] â t . We introduce and study several statistics on the classical Weyl groups of type B and D and show that they can be used to give an explicit formula for Z D n . More precisely, we define two Mahonian statistics, that is, statistics having the same distribution as the length function, Dmaj and ned on Dn. The statistic Dmaj, defined in a combinatorial way, has an analogous algebraic meaning to the major index for the symmetric group and the flag-major index of Adin and Roichman for Bn; namely, it allows us to find an explicit formula for Z D n . Our proof is based on the theory of t-partite partitions introduced by Gordon and further studied by Garsia and Gessel. Using similar ideas, we define the Mahonian statistic ned also on Bn and we find a new and simpler proof of the AdinâRoichman formula for Z B n . Finally, we define a new descent number Ddes on Dn so that the pair (Ddes,Dmaj) gives a generalization to Dn of the Carlitz identity on the EulerianâMahonian distribution of descent number and major index on the symmetric group. 2000 Mathematics Subject Classification 05E15 (primary), 05A19 (secondary).