Question: Find all pairs $(p,n)$ positive integers where $p$ is a prime number and $p^3-p=n^7-n^3$.
My approach: Given that $p,n\in\mathbb{Z}^+$, where $p$ is a prime, such that $p^3-p=n^7-n^3$.
This implies that $p(p^2-1)=n^3(n^2-1)(n^2+1)\implies p|n^3$ or $p|n^2-1$ or $p|n^2+1$.
Case 1: $p|n^3$. This implies that $p|n\implies n=pk$ for some positive integer $k$. Therefore we have $n^7=p^7k^7$ and $n^3=p^3k^3$. Therefore $$p^3-p=p^7k^7-p^3k^3\\ \implies p^2-1=p^6k^7-p^2k^3\\\implies p^2-1=p^2(p^4k^7-k^3)\\\implies p^2|p^2-1, \text{ which is a contradiction.}$$ Hence $p\not|n^3.$
Case 2: $p|n^2-1.$ Observe that for any prime $p_1, p_1^3-p_1>0\implies p^3-p>0\implies n^7-n^3=n^3(n^2-1)(n^2+1)>0.$ Now for any $n_1\in\mathbb{N}, n_1^3>0$ and $n_1^2+1>0$. This implies that $n^3>0$ and $n^2+1>0$, which in turn implies that we must have $n^2-1>0$.
Therefore, $p|n^2-1$ implies that $pk=n^2-1$, for some positive integer $k$. Therefore, $n^2+1=pk+2$ and $n^3=pkn+n$.
Therefore we have $$p^3-p=n^7-n^3=n^3(n^2-1)(n^2+1)=(pkn+n)(pk)(pk+2)\\\implies p^2-1=(pk^2+2k)(pkn+n).$$
Now $pk^2+2k>p$ and $pkn+n>p$, which in turn implies that $(pk^2+n)(pkn+n)>p^2$. Therefore we have $$p^2-1>p^2\\\implies -1>0, \text{ which is a contradiction.}$$ Hence $p\not |n^2-1.$
Case 3: $p|n^2+1$. This implies that $p\le n^2+1$. Now since we have $$p^3-p=n^7-n^3\implies p^3-p=n^3(n^4-1)\implies n^3|p^3-p\implies n^3\le p^3-p\implies n^3<p^3\implies n<p.$$
Therefore we have $n<p\le n^2+1$. Thus $n^2<p^2\le (n^2+1)^2\implies n^2-1< p^2-1\le n^4+2n^2.$
Hence we have $$n^3-n<p^3-p\le (n^2+1)(n^4+2n^2)\\ \implies n^3-n<n^7-n^3\le n^6+3n^4+2n^2\\ \implies n^2-1<n^6-n^2\le n^5+3n^3+2n\hspace{0.5 cm}...(*)$$
Observe that $(*)$ is satisfied only by $n=1$ and $n=2$.
Now of course $n=1$ yields no solution, since $p^3-p>0$.
Now when $n=2$, we have $p^3-p=(p-1)p(p+1)=120.$ Observe that only $p=5$ satisfies the equation.
Therefore, the only pair $(p,n)$ that satisfies the equation $p^3-p=n^7-n^3$ is $(p,n)=(5,2)$.
Can someone check if my solution is correct or not? And is there a better alternate solution?