Prove that if $n,d\in\mathbb{Z^+}$ and $2{n^2}\equiv0\pmod{d}\therefore n^2+d$ is not a perfect square.
This question to me is tricky so any help would be nice. Here is what I have attempted: I assumed the contradiction. $$n^2+d=x^2$$ $$(n-x)(n+x)=d$$ However, I was unable to use that.
I also tried to assume that $md=2n^2$ where $m\in\mathbb{Z^+}$ I also tried to find $d \pmod 2$ Nothing really helped me so any help would be appreciated
Here are two proofs:
Proof 1:
Let $n$ be the smallest positive integer for which there exists some $d$ such that $n^2+d$ is a perfect square and $2n^2\equiv0\pmod{d}$. Let $c,x\in\Bbb{Z}$ be such that $n^2+d=x^2$ and $cd=2n^2$. Then $$cx^2=c(n^2+d)=(c+2)n^2.$$ Reducing mod $4$ shows that both $n$ and $x$ are even. It follows that $d\equiv0\pmod{4}$ and so $$\left(\frac{n}{2}\right)^2+\frac{d}{4}=\left(\frac{x}{2}\right)^2 \qquad\text{ and }\qquad 2\left(\frac{n}{2}\right)^2\equiv0\pmod{\frac{d}{4}},$$ contradicting the minimality of $n$. Hence no such positive integer exists.
Proof 2:
If $n^2+d$ is a perfect square where $n,d\in\Bbb{Z}^+$ then for some $k\in\Bbb{Z}^+$ we have $$n^2+d=(n+k)^2=n^2+2kn+k^2,$$ and so $d=k(2n+k)$. Then $2n^2\equiv0\pmod{d}$ means that $k(2n+k)\mid 2n^2$, that is to say, $$2n^2=mk(2n+k),$$ for some integer $m$. This is a quadratic equation in $n$ with roots $$n=\frac{k}{2}\left(m\pm\sqrt{m^2+2m}\right),$$ which is an integer if and only if $m^2+2m$ is a perfect square. But because $m>0$ we have $$m^2<m^2+2m<m^2+2m+1=(m+1)^2,$$ a contradiction. So $n^2+d$ is not a perfect square.