Compute the sum of number of fixed points $\newcommand{\def}{\mathrm{def}}\newcommand{\std}{\mathrm{std}}\newcommand{\triv}{\mathrm{triv}}$Suppose $V_\def, V_\std, V_\triv$ are the defining , standard and trivial representations of the symmetric group $S_n$.
And let $V_\def \cong V_\std \oplus V_\triv$, and suppose the characters of $V_\def$ and $V_\std$ are given by 
$\chi_\def(\pi) = f(\pi)$ and $\chi_\std(\pi) = f(\pi) - 1$, where $f(\pi)$ is the number of fixed points of $\pi$.
Compute $\sum_{\pi \in S_n} f(\pi)$ and $\sum_{\pi \in S_n} f(\pi)^2$.
attempt: Let $V_\def \cong V_\std \oplus V_\triv$. 
So $\chi_\def = \chi_\std + \chi_\triv$.
Then 
\begin{align}
& \sum_{\pi \in S_n} f(\pi) = \sum_{\pi \in S_n} \chi_\def(\pi) = \sum_{\pi \in S_n} [\chi_\std(\pi) + \chi_\triv(\pi)] \\[10pt]
= {} & \sum_{\pi \in S_n}[ f(\pi) - 1 + (f(\pi) - (f(\pi) - 1)) ] = \sum_{\pi \in S_n} f(\pi)
\end{align}
Can someone please help me? I dont really know how to compute this? because I end up getting the same thing.
Thanks!

Every element is a fixed point of $(n-1)!$ permutations, so 
$$
\sum_{\pi\in S_n}f(\pi)=\sum_{\pi\in S_n}\sum_{k\in[n]}1_{\pi(k)=k}=\sum_{k\in[n]}\sum_{\pi\in S_n}1_{\pi(k)=k}=\sum_{k\in[n]}(n-1)!=n!\;.
$$
You can get the sum of the squares either using representation theory as
$$
\sum_{\pi\in S_n}f(\pi)^2=\sum_{\pi\in S_n}\chi_{\mathrm{def}}(\pi)^2=2n!
$$
(since the defining representation is the sum of two irreducible representations), or from the fact that it counts the number of fixed ordered pairs, which is 
\begin{align}
\sum_{\pi\in S_n}f(\pi)^2&=\sum_{\pi\in S_n}\sum_{(k,l)\in[n]^2}1_{\pi(k)=k\land\pi(l)=l}\\
&=\sum_{(k,l)\in[n]^2}\sum_{\pi\in S_n}1_{\pi(k)=k\land\pi(l)=l}\\
&=n(n-1)!+n(n-1)(n-2)!\\
&=2n!\;,
\end{align}
since there are $n$ pairs of the form $(k,k)$ that are fixed by $(n-1)!$ permutations and $n(n-1)$ other pairs that are fixed by $(n-2)!$ permutations.
