I am self studying elementary number theory by David Burton and got stuck on this problem in exercise $$11.4$$ of chapter - numbers of special form.

Question is:

for $$n> 0$$ prove that $$F_n$$ ( Fermat number $$n$$) is never a triangular number.

Let's just try to solve it directly. We want $$2^{2^n}+1=\frac {k(k+1)}2\implies k^2+k-2(2^{2^n}+1)=0$$
For this to have an integer solution, or even a rational one, we would need the discriminant to be the square of an integer. Thus we require that $$\sqrt {1+8(2^{2^n}+1)}\in \mathbb N$$
Thus we want $$1+8(2^{2^n}+1)=m^2\implies 2^{2^n+3}=m^2-9=(m+3)(m-3)$$
Now, this is nearly impossible. To achieve it, we'd need to have both $$m-3,m+3$$ powers of $$2$$ but since $$m-3, m+3$$ differ by $$6$$ the only solutions would be very small. Indeed the only powers of $$2$$ that differ by $$6$$ are $$(2,8)$$. It is easy to show that $$n=0, k=2,m=5$$ is the only small solution and the above shows that there are no large ones, so we are done.