TITLE: When is $(q^k-1)/(q-1)$ a perfect square?
QUESTION [18 upvotes]: Let $q$ be a prime power and $k>1$ a positive integer. For what values of $k$ and $q$ is the number $(q^k-1)/(q-1)$ a perfect square, that is the square of another integer? Is the number of such perfect squares finite? 
Note that $(q^k-1)/(q-1)$ is the number of points in a finite projective space of dimension $k-1$. The above question is related to the following one: How many non-isomorphic finite projective spaces are there whose numbers of points are perfect squares. 
Preliminary calculation shows that $(q^k-1)/(q-1)$
is a perfect square when $(k,q)$ takes on one of the values  $(2,3)$, $(5,3)$, $(4,7)$, $(2,8)$, in which cases it is equal to  $2^2$, $11^2$, $20^2$, $3^2$, respectively. When $k=2$, $(q^k-1)/(q-1)$ is a perfect square if and only if $q=3$ or 8. When $k=3$, $(q^k-1)/(q-1)$ cannot be a perfect square. When $q=2$, $(q^k-1)/(q-1)$ cannot be a perfect square.

REPLY [31 votes]: The equation
$$ \frac{x^k-1}{x-1}=y^m$$
is known as the Nagell-Ljunggren equation. It is conjectured that for $x\geq 2$, $y\geq 2$, $k\geq 3$, $m\geq 2$, the only solutions are 
$$ \frac{3^5-1}{3-1}=11^2,\qquad \frac{7^4-1}{7-1}=20^2,\qquad \frac{18^3-1}{18-1}=7^3.$$
For $m=2$, the equation was solved by Ljunggren (Norsk. Mat. Tidsskr. 25 (1943), 17-20).
Hence for your problem (where $m=2$ and $x$ is a prime power) we can assume that $k=1$ or $k=2$. In the first case, $y=1$ and $x$ is arbitrary, which we can regard as trivial solutions. In the second case, $x=y^2-1$ is a prime power, whence it is easy to see that either $x=8$ and $y=3$, or $x=3$ and $y=2$. To summarize, your equation only has the four solutions listed in your post, besides the trivial solutions ($k=1$ and $y=1$).