Find all positive integers $n$ such that $2^{n}+3$ is a perfect square. The same question with $2^{n}+1$.
For $n=0,2^{n}+3=2^{2}$ is a perfect square. We verify that $n=1$ is not a solution. Therefore, we can assume $n \geq 2$ and $2^{n}+3 \equiv 3 \pmod{4}$, but a square is congruent to 0 or 1 modulo 4, so for $n \geq 2, 2^{n}+3$ is not a perfect square.

Suppose that $2^{n}+1=x^{2}$. Then $(x-1)(x+1)=2^{n}$. Therefore, $x-1=2^{k}$ and $x+1=2^{n-k}$. Hence, $2^{k}+1=2^{n-k}-1$. Therefore, $2=2^{n-k}-2^{k}$, so $2^{k}$ divides 2, thus $k=0$ or $k=1$. We then get $x=2$ or $x=3$, which gives $(n, x)=(3,3)$ as the only solution.