<s>[INST] Are $\frac{p^2+1}{2}$ and $\frac{p^{5n}(p^5-1)}{2}$ are coprime to each other, $n \in \mathbb{N}$? Let $p$ be a prime integer greater than $2$.
Then I want to prove the followings:
$(1)$ $\frac{p^2+1}{2}$ and $\frac{p^5-1}{2}$ are coprime to each other.
$(2)$ $\frac{p^2+1}{2}$ and $\frac{p^{5n}(p^5-1)}{2}$ are coprime to each other, $n \in \mathbb{N}$
$(3)$ Are $\frac{p^2+1}{2}$ and $\frac{p^{5n-3}(p^5-1)}{2}$ coprime to each other, $n \in \mathbb{N}$ ?

$(1)$
For $p=3$, $(p^2+1)/2=5$ and $(p^5-1)/2=141$ while $\gcd(5,141)=1$.
For $p=5$, $(p^2+1)/2=13$ and $(p^5-1)/2=1562$ while $\gcd(13,1562)=1$.
For $p=7$, $(p^2+1)/2=25$ and $(p^5-1)/2=8403$ while $\gcd(25,8403)=1$.
But how to prove the general case ?
From here, it is known that $a$ and $b$ are coprime if and only if $a^n$ and $b^n$ are coprime.
Thanks
 [/INST] This is for the question in the title.  Let $q$ be a prime dividing both numbers.  Then $q\mid p^2+1$, say $p^2+1 = Kq.$  Also note that $q\neq p$, so we must have $$q\mid p^5 -1 = p^5 + p^3 - p^3 - p +p -1 $$ $$= p^3(p^2+1) - p(p^2+1) + p-1$$
$$=p^3Kq -pKq + p-1.$$
Therefore $q\mid p-1$.  And so $q\mid p^2-1$.  Since it also divides $p^2+1$ it must divide $2$.  So $q=2$.
But if $p$ is an odd prime then $p^2 = 4m+1$ for some $m$.  So $(p^2+1)/2$ is odd, and so $2$ can't divide it.
Since the two numbers have no common factor, they are coprime.
</s>