Let $G$ be a non-abelian group of order $p^3$. How many are its conjugacy classes?
The conjugacy classes are the orbits of $G$ under conjugation of $G$ by itself. Since $G$ is non-abelian, its center has order $p$. So the class equation yields $p^3 = p + \sum_{[x]} (G: G_x)$, where $G_x$ is the centralizer of $x$ and the sum is taken over disjoint orbits $[x]$. We can also see that $(G:G_x)$ can only be $p$ or $p^2$. So we will have $p$ orbits of length $1$ and then orbits of length $p$ and $p^2$. Any hints on determining the number of the latter?