Hints for solving this Number Theory problem on divisibility

126 Views Asked by At

Find all positive integers $d$ such that $d$ divides both $n^{2}+1$ and $(n + 1)^{2}+1$ for some integer $n$.

Currently what I am thinking of is like manipulating $n^{2}+1$ and finding out the answer. Please guide me on how to move forward with this problem.

HINTS ONLY

Thanks for helping.

1

There are 1 best solutions below

8
On BEST ANSWER

The idea is to reach at a constant divisible by $d$

If $d$ divides $a,b;d$ must divide $ax+by$ for integers $a,b,x,y$

So, $d$ must divide $1\cdot(n+1)^2+1(-1)\cdot(n^2+1)=2n+1$

So, $d$ must divide $n\cdot(2n+1)+(-2)\cdot(n^2+1)=n-2$

Follow the pattern to find $d$ must divide $5$