A close reative of "Inflated" Eulerian polynomials I came across this post Coefficients of the Inflated Eulerian Polynomial by AULI-GRAHAM-SAVAGE. In particular, the polynomials related to descents interested me
$$P_n(x)=\sum_{\pi\in\mathfrak{S}_n}x^{n\cdot\text{des}(\pi)+\pi_n}.$$
Here $\pi=\pi_1\pi_2\cdots\pi_n\in\mathfrak{S}_n$ is a permutation on the letters $[n]=\{1,2,\dots,n\}$.
Let's introduce the following variant with respect to major index or inversion number statistics
$$Q_{n,a}(x)=\sum_{\pi\in\mathfrak{S}_n}x^{a\cdot\text{maj}(\pi)+\pi_n}.$$

QUESTION. Is this true?
$$
Q_{n,a}(x)
=x^n\left(1+x^{a-1}+\cdots+x^{(a-1)(n-1)}\right)\prod_{j=0}^{n-2}\left(1+x^a+\cdots+x^{aj}\right).$$

 A: Yes, this is true. First of all, we denote $x^a=t$, then the relation to prove reads as $$\sum_{\pi} t^{{\rm maj}(\pi)}x^{\pi_n}=(x^n+x^{n-1}t+\ldots+xt^{n-1})\prod_{j=0}^{n-2}(1+t+\ldots+t^{j}).\quad\quad\quad (1)$$
Taking the coefficients of the fixed power of $x$, say $x^s$, in both sides of (1), we reduce (1) to the identity
$$
\sum_{\pi:\pi_n=s}  t^{{\rm maj}(\pi)}=t^{n-s}\prod_{j=0}^{n-2}(1+t+\ldots+t^{j}). \quad\quad\quad (2)
$$
We prove that (2) holds for all $n$ by induction on $n$. The base case $n=1$ is trivial. Assume that (2) holds for $n-1$ and prove it for $n$. Partition the set $\Omega(n,s)$ of all $(n-1)!$
permutations of $(\pi_1,\ldots,\pi_{n-1})$ of $\{1,\ldots,n\}\setminus \{s\}$ onto $n-1$ disjoints subsets $\Omega(n,s,j)=\{\pi:\pi_{n-1}=j\}$.
For $j<s$ the element $n-1$ does not contribute to the major index of $\pi$ and by induction proposition the corresponding sum over $\Omega(n,s,t)$ equals $t^{n-1-j}\prod_{j=0}^{n-3}(1+t+\ldots+t^{j})$.
For $j>s$ the element $n-1$ does contribute to the major index of $\pi$ and by induction proposition the corresponding sum over $\Omega(n,s,t)$ equals $t^{2n-2-(j-1)}\prod_{j=0}^{n-3}(1+t+\ldots+t^{j})$. Totally we get
$$
\prod_{j=0}^{n-3}(1+t+\ldots+t^{j})\cdot \left((t^{n-s}+\ldots+t^{n-2})+(t^{n-1}+\ldots+t^{2n-2-s})\right),
$$
that's RHS of (2).
