# For every integer $n$ , find how many elements of order $n$ there are in $S_5$

I know that $S_5$ has order $5!$, knowing that numebr of elements of order $n$ refers to the number of elements $x$ such that $x^n$ is the identity element, but $x^m$ is not for any $m<n$. However, I don't know where to start to solve the question.

Write an element of $S_5$ in its cycle form. If there are cycles of length $a_1,a_2,\ldots,a_n$, then it is not hard to show that the element has order $\text{lcm}(a_1,a_2,\ldots,a_n)$.
The different combinations of cycles which can appear are precisely the partitions of $5$, i.e. \begin{align*} 1+1+1+1+1\\ 2+1+1+1\\ 2+2+1\\ 3+1+1\\ 3+2\\ 4+1\\ 5 \end{align*} Elements of the resulting form have orders $1,2,2,3,6,4,5$ (by taking lcms). Do you see how to finish from here?