TITLE: Diophantine equation $3^n-1=2x^2$
QUESTION [14 upvotes]: How to solve a Diophantine equation like $$3^n-1=2x^2$$. One can easily see that the parity of $n$ and $x$ will be same and equation further can be seen taking if $$n\equiv0\pmod3\quad \text{then }x \equiv0\pmod{13}  $$ but I don't know what  to do further.

REPLY [16 votes]: W. Ljunggren proved in 1 that the Diophantine equation
$$\frac{x^{n}-1}{x-1} = y^{2}$$
doesn't admit solutions in integers $x>1, y>1, n>2$, except when $n=4, x=7$ and $n=5, x=3$. Since your equation can be rewritten as $$\frac{3^{n}-1}{3-1} = x^{2},$$ the aforementioned result of Ljunggren implies that its solutions in non-negative integers are $(n=0,x=0), (n=1,x=1), (n=2,x=2),$ and $(n=5,x=11)$.
Alternatively, you can find a solution to this problem via Pell equations on page 243 of the March issue of vol. 110 (2003) of the American Mathematical Monthly... After noticing that this problem made it sometime to the problems & solutions department of the AMM, I couldn't help but recall what Léo Sauvé, former editor of Crux Mathematicorum, said on one occasion: "it seems like all problems were published in the Monthly once..." 
References

W. Ljunggren, Some theorems on indeterminate equations of the form $\frac{x^{n}-1}{x-1} = y^{q}$ (In Norwegian). Norsk. Mat. Tidsskr. 25 (1943), pp. 17--20.
On a result attributed to W. Ljunggren and T. Nagell, question 206645 in math-overflow.