<s>[INST] Unique pair of positive integers $(p,n)$ satisfying $p^3-p=n^7-n^3$ where $p$ is prime 
Q. Find all pairs $(p,n)$ of positive integers where $p$ is prime and $p^3-p=n^7-n^3$.

Rewriting the given equation as $p(p+1)(p-1)=n^3(n^2+1)(n+1)(n-1)$, we see that $p$ must divide one of the factors $n,n+1,n-1,n^2+1$ on the $\text{r.h.s}$. 
Now, the $\text{l.h.s}$ is an increasing function of $p$ for $p\ge1$. This implies that for any given $n\ge1$, there is exactly one real $p$ for which $\text{l.h.s}=\text{r.h.s}$. For $p=n^2$, we get $\text{l.h.s}=n^6-n^2<n^7-n^3=\text{r.h.s}.$ This means that either $p>n^2$ or $p<n^2$ must hold.
Assuming $p>n^2$, it follows that the prime $p$ cannot divide any of $n,n+1,n-1$. So $p$ must divide $n^2+1$ and hence $p=n^2+1\quad (\because p>n^2)$.
Substituting the value of $p$ in the given equation we get, $n^2+2=n^3-n\implies n^3-n^2-n=2$. As the factor $n$ on the $\text{l.h.s}$ must divide $2$, the above equation has a unique integer solution $n=2$.
Finally, we get $(5,2)$ as the solution to the given equation. 

But how do I conclude this is the only solution possible? Also, why does'nt $p<n^2$ (the case which I ignored) hold? As a bonus question, I would like to ask for any alternative/elegant solution (possibly using congruence relations) to the problem.

 [/INST] 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)$.
</s>