Exact formulas for certain generating functions of Euler numbers of moduli spaces