3

Is there anything I can tell about $\gcd(x^2+1,x^2+4x+5)$ for any given integer $x$? I believe I've seen similar questions in the past, though I don't remember any details or what to search for. I did write a computer program to check the first $50$ values which seem to alternate between $1$ and $2$, but how do I prove this?

Mike
  • 13,318

1 Answers1

6

If $d$ divides both

$d$ will divide $x^2+4x+4-(x^2+1)=4(x+1)$

$d$ will divide $4(x^2+1)-4(x+1)(x-1)=8$

Now if $x$ is even $x^2+1$ is odd $\implies(x^2+1,x^2+4x+5)=1$

If $x$ odd, $x^2\equiv1\pmod8\iff x^2+1\equiv2\implies(x^2+1,x^2+4x+5)=2$