I have to demonstrate that:
Show $Z(A_n) = \{ e \}, \forall n \geq 4$.
I think I solved this problem, but I am not sure. This is my solution:
Let's say $Z(A_n) \neq \{ e \}, \forall n \geq 4$. Then I have two cases:
1) $n = 2k, k \in \Bbb Z$
2) $n = 2k+1, k \in \Bbb Z$.
I tried only case 1), I think case 2) work the same as well. I choose: $$a = \begin{pmatrix} 1 & 2 & 3 & \cdots & n-2 & n-1 & n\\ 2 & 3 & 4 & \cdots & n-1 & 1 & n \end{pmatrix},$$ where $a \in Z(A_n)$ and $$\sigma = \begin{pmatrix} 1 & 2 & 3 & \cdots & i & \cdots & n-1 & n\\ 2 & 3 & 4 & \cdots & i+1 & \cdots & n & 1 \end{pmatrix},$$ where $\sigma \in A_n.$
Then we have $a(\sigma(n-1)) = a(n) = n$ and $\sigma(a(n-1)) = \sigma(1)=2$ so $a(\sigma(1)) \neq \sigma(a(2))$, contradiction.
Not sure why the other answer had a -1 as it looks correct to me, but I'll give a hint of slightly faster proof:
Suppose $1\ne\sigma\in Z(A_n)$ so there is some $i\in\{1,\ldots,n\}$ with $\sigma(i)\ne i$.
Choose some $\rho\in A_n$ with $\rho(i)=i$ and $\rho(\sigma(i))\ne\sigma(i)$. Use $(\rho\sigma\rho^{-1})(i)$ to show $\rho\sigma\rho^{-1}\ne\sigma$ completing the proof by contradiction.