By the Bruhat decomposition of $GL(n, \mathbb{F}\_q) / B\_n$ we know that $$[n]! = \sum\_{ \sigma \in S(n)} q^{l(\sigma)}$$ where $[n]! = \prod\_{j=1}^n (1+q + \cdots + q^{j-1})$ and $l(\sigma)$ is the length of the permutation $\sigma \in S(n)$ (also known as the number of involutions of $\sigma$).


We also know that $$\theta^{(n)} = \sum\_{\sigma \in S(n)} \theta^{[\sigma]}$$ where $[\sigma]$ is the number of cycles of the permutation $\sigma \in S(n)$ and $\theta^{(n)} = \theta(\theta+1) \cdots (\theta+n-1)$. Notice that $$\lim\_{q \rightarrow 1} \ [n]! = n! = \lim\_{\theta \rightarrow 1} \ \theta^{(n)}.$$ Is there a way to write $$\sum\_{\sigma \in S(n)} q^{l (\sigma)} \theta^{[\sigma]}$$ explicitly as a function of $q$ and $\theta$?



Two ways of generalizing factorials via symmetric groups
It seems like there is no hope for a nice closed form for $F(q,\theta)=\sum\_{\sigma\in S\_n}q^{l(\sigma)}\theta^{[\sigma]}$. When the sum is restricted to $\sigma\in S\_n$ which are involutions, the computation can be found in I. Gessel's paper ["A q-analog of the exponential formula"](http://www.sciencedirect.com/science/article/pii/0012365X82901893).


For the general case, the study of $F(q,\theta)$ is the main topic of P.H. Edelman's paper "On inversions and cycles in permutations" (Europ. J. Combinatorics,(1987) vol 8, 269-279). he proves a bunch of properties of this bivariate generating function, yet, according to this paper even computing the number of permutations which achieve the minimum number of cycles with a fixed number of inversions hasn't been carried. It gives a bunch of open problems about $F(q,\theta)$.


If on the other hand you let $l(\sigma)$ denote the number of inversions of $\sigma$ written in cycle notation (i.e. the number of inversions in $(a\_1\dots a\_{k\_1})(a\_{k\_1+1}\dots a\_{k\_2})\cdots(a\_{k\_{r}+1}\dots k\_{r+1})$) then the sum is $\prod \_{i=1}^n [i] \_{q} ^{\theta}$, where 
$$[i]\_{q}^{\theta}= 1+q+\cdots+q^{i-2}+\theta q^{i-1}.$$
This is proved in ["Cycles and patterns in permutations"](http://arxiv.org/abs/math/0610616) by R. Parviainen.


