Let $X = \{Q,W,E,R\}$. Using exponential generating functions, obtain the number of $r$-permutations that can be formed such that there is an even number of $Q$'s and an odd number of $W$'s in each permutation.
After all my work, I obtain the following equation.
$$\frac{1}{4} \left(e^{4 x}-1\right)$$
As far as I can tell, it equals $$\frac{4^r-1}{4} $$
Am I wrong so far?
For $3$-permutation in given conditions, I expect $QQW,QWQ,WQQ$
When I substitute $r$ with $3$ in $\frac{4^r-1}{4} $, I don't get $3$.
What is my wrong? Can you help me?