<s>[INST] Proving $\gcd(n^2(n^2+1),2n+1)=\gcd(2n+1,5)$ We suppose $\forall n \in \mathbb {N}\setminus{0}$.
How can I prove that $\gcd(n^2(n^2+1),2n+1)=\gcd(2n+1,5)$?
 [/INST] Using the Euclidean Algorithm, we get
$$
16n^2(n^2+1)-(8n^3-4n^2+10n-5)(2n+1)=5\tag{1}
$$
Therefore, $(n^2(n^2+1),2n+1)\mid5$.
Furthermore, since $(5,16)=1$, we have $5\mid2n+1\Longleftrightarrow5\mid n^2(n^2+1)$. Thus,
$$
(n^2(n^2+1),2n+1)=(2n+1,5)\tag{2}
$$
</s>