If for some number $n\in \mathbb N$, the numbers $2n+1$ and $3n+1$ are perfect squares of integers, then prove that $8|n$.
if $2n+1=m^2$ and $3n+1=k^2$ then $k^2-m^2=3n-2n+1-1=n$ now I need to show that $8|k^2-m^2$ when you divide a some number $m^2$ with $8$ then remainder is $0,1,4$, so I need to show that $m^2$ and $k^2$ have the same remainder. But I do not know is this good way because I do not know how to prove that they must have the same remainder
If $k$ is odd, then $k^2\equiv1 \mod 8$. Hence $3n+1\equiv1\mod 8$, $2n+1\equiv 1\mod 8$, so $$(3n+1)-(2n+1)\equiv 1-1\equiv 0\mod 8$$