<s>[INST] Positive integer $n$ such that $2n+1$ , $3n+1$ are both perfect squares How many positive integer $n$ are there  such that $2n+1$ , $3n+1$ are both perfect squares ? 
$n=40$ is a solution . Is this the only solution ? Is it possible to tell whether finitely many or infinitely many solutions exist ? 
 [/INST] We can do this modulo $4$. Since $n \equiv 0,1,2,3 \pmod{4}$, therefore
$$2n+1 \equiv 1,3,1,3 \pmod{4}$$ and
$$3n+1 \equiv 1,0,3,2 \pmod{4}.$$
However a square of an integer is only $0,1 \pmod{4}$. This means for both $2n+1$ and $3n+1$ to be squares $n \equiv 0 \pmod{4}$.
So let $n=4k$. Then we want $2n+1=8k+1$ and $3n+1=12k+1$ to be perfect squares. Let $8k+1=a^2$ and $12k+1=b^2$. Then 
$$4k=b^2-a^2=(b-a)(b+a).$$
Can you proceed from here? 
</s>