$\forall n\in\mathbb{Z}$, find the $\gcd(n^2+1, (n+1)^2+1)$? 
$\forall n\in\mathbb{Z}$, find the $\gcd(n^2+1, (n+1)^2+1)$. 

I think this is a simple exercise, but I get this: 
$(n+1)^2+1=n^2+2n+2$. 
$n^2+2n+2 = (n^2+1)+(2n+1)$ 
then $\gcd(n^2+1, (n+1)^2+1)=\gcd(n^2+1, 2n+1)$ 
and $\displaystyle n^2+1 = \frac{n(2n+1)}{2}+\left(-\frac{n}{2}+1\right)$ 
then $\gcd(n^2+1, 2n+1)=\gcd(2n+1, \frac{n}{2}-1)$. 
But gcd is on integer numbers and $\dfrac{n}{2}-1$ is not always an integer number, so, I need some help?

Note that $$(2n+3)(n^2+1) - (2n-1)((n+1)^2+1) = 5.$$
To get this equation, set $(n+a)(n^2+1)-(n+b)(n^2+2n+2) = c$ for some constants $a,b,c$, and equate coefficients. This gives $b = -\tfrac{1}{2}$, $a = \tfrac{3}{2}$, and $c = \tfrac{5}{2}$. Then, multiply both sides by $2$.
Hence, $\text{gcd}(n^2+1,(n+1)^2+1)$ divides $5$ (which is prime). 
Then, since $n^2+1 \equiv 0 \pmod{5}$ iff $n \equiv 2,3 \pmod{5}$ and $(n+1)^2+1 \equiv 0 \pmod{5}$ iff $n \equiv 1,2 \pmod{5}$ we have that $$\text{gcd}(n^2+1,(n+1)^2+1) = \begin{cases}5 & \text{if} \ n \equiv 2 \pmod{5} \\ 1 & \text{otherwise}\end{cases}.$$
