# How to solve $1+2^{a}+2^{2a+1}=b^2$ [duplicate]

I want to find all integer solutions for $1+2^{a}+2^{2a+1}=b^2$. How could I do this?

1. When $a\le -1$, $1<1+2^a+2^{2a+1}\le 2$, no solution.
2. When $a=0$, $b=\pm 2$.
3. When $a\ge 1$, from $$(2^a+1)^2<b^2=1+2^a+2^{2a+1}<(2^a+2^{a-1}+1)^2$$ we know that $|b|=2^a+k$ for some integer $k$ satisfying $2\le k\le 2^{a-1}$. Since $$1+2^a+2^{2a+1}=(2^a+k)^2\Rightarrow 2^a\mid (k-1)(k+1)$$ and since $\gcd(k-1, k+1)\le 2$, we know that either $2^{a-1}\mid (k-1)$ or $2^{a-1}\mid (k+1)$. However, since $2\le k\le 2^{a-1}$, the only possible case is $k=2^{a-1}-1$. Then $$1+2^a+2^{2a+1}=(2^a+2^{a-1}-1)^2\iff a=4.$$ Therefore, when $a\ge 1$, $a=4$ and $b=\pm 23$.
• $1<1+2^a+2^{2a+1}\leq 2$ does not imply, that there are no solutions. In fact there is one in this case (actually two). Commented Jul 30, 2013 at 16:50
• @Tomas: There is no integer $b$, such that $1<b^2\le 2$.
• Isn't there another possible $k$, $k=1$? That gets elimininated - $k=1$ implies $a=0$. But it is certainly a possible case. Commented Jul 30, 2013 at 17:46