This question is motivated by Richard Stanley's answer to [this MO question](https://mathoverflow.net/questions/324510/equivalence-class-of-permutations-based-on-cycle-decomposition-and-their-inverse/324536#324536).


Let $g(n)$ be the number of distinct monomials in the expansion of the determinant of an $n\times n$ generic "*skew-symmetric $+$ diagonal*" matrix.


For example, $g(3)=4$ since 
\begin{align\*}
\det\begin{pmatrix} x\_{1,1}&x\_{1,2}&x\_{1,3} \\
-x\_{1,2}&x\_{2,2}&x\_{2,3} \\ -x\_{1,3}&-x\_{2,3}&x\_{3,3} 
\end{pmatrix}
&=x\_{1, 1}x\_{2, 2}x\_{3, 3}+x\_{1, 1}x\_{2, 3}^2+x\_{1, 2}^2x\_{3, 3}
+x\_{1, 3}^2x\_{2, 2}.
\end{align\*}
The sequence $g(n)$ seems to have found a match in [OEIS](https://oeis.org/A087214) with the generating function 
 $$ \sum\_{n\geq 0} g(n)\frac{x^n}{n!} = \frac{e^x}{1-\frac12x^2}.$$



> 
> **QUESTION.** Is it true and can you furnish a proof for
>  $$g(n)=\sum\_{k=0}^{\lfloor \frac{n}2\rfloor}\frac{n!}{(n-2k)!\,\,2^k}?$$
> 
> 
> 


**POSTSCRIPT.** I'm convinced by Stanley's reply below, so let's correct the above as follows:
$$g(n)=\sum\_{k=0}^{\lfloor n/2\rfloor}\binom{n}{2k}\frac{(2k)!}{k!}\cdot\prod\_{i=1}^k\frac{4i-3}4\cdot\sum\_{j=0}^{\lfloor n/2-k\rfloor}
\binom{n-2k}{2j}\frac{(2j)!}{4^j\,j!}.$$



Counting monomials in skew-symmetric+diagonal matrices
The correct generating function is 
 $$ \exp\left( x +\frac{x^2}{2}+\frac 12\sum\_{n\geq 2}\frac{x^{2n}}{2n}\right) 
 =\frac{\exp\left(x+\frac{x^2}{4}\right)}{(1-x^2)^{1/4}}. $$ 
This appears in <http://oeis.org/A243107>, but without a combinatorial or algebraic interpretation. For skew symmetric matrices just multiply by $e^{-x}$.


