prove that $n$ is divisible by $8$ If $2n+1$ is a square number and $3n+1$ is a square number also, where $n \in \mathbb{N}$, prove that $n$ is divisible by $8$.
I know the solution already. just for sharing new ideas.
thank in advance 
 A: Any odd perfect square number is congruent to $1$ modulo $8$.
So $$2n+1 \equiv 1 \pmod 8$$ or, $$8\big|2n$$ or, $$4\big|n$$
So $n$ is even and $3n+1$ is odd.
Hence $3n+1$ is an odd perfect square.
Following above reasoning, we similarly have $$8\big|3n$$
These imply $$8\big|n$$
A: Let $2n+1=a^2$. Since $a$ is odd, let $a= 2k+1$. Then $n=2k(k+1)$. We are also given that $3n+1=b^2$. With $n$ being even, we infer that $b$ is odd.
Then $n=b^2-a^2$, where both $a$ and $b$ are odd numbers. Thus both are $1\pmod{8}$. Consequently their difference is divisible by $8$.
A: First note that because $2n+1=a^2$ is odd, and the odd squares are all of the form $4r+1$ (congruent to $1 \bmod 4$ - we could say modulo $8$ but don't need this) we have that $n$ is even, and $3n+1=b^2$ is therefore odd. This means that $a$ and $b$ are both odd.
Then $n=b^2-a^2=(b-a)(b+a)$ where the two factors are even. The factors differ by $2a$, which is twice an odd number. So one of $b-a$ and $b+a$ must be divisible by $4$ and their product $n$ is divisible by $8$. 
[two numbers of the form $4k+2$ differ by a multiple of $4$]
