# When is $(q^k-1)/(q-1)$ a perfect square?

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.

• $k=1$ is also a positive integer. – Emil Jeřábek supports Monica Aug 6 '14 at 17:38
• Finite projective space, not plane, I would say. – Allen Knutson Aug 6 '14 at 18:04
• I get (2, a^2-1) as a solution, giving more cases than just q=3 or 8. What am I not seeing? (Answer: that a^2-1 is also a prime power.) – The Masked Avenger Aug 6 '14 at 18:10
• – Max Alekseyev Aug 7 '14 at 6:45
• How is this projective geometry? – Mayank Pandey Sep 27 '14 at 7:08

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$).

• Thanks. Is there an English translation of Ljunggren's paper? – Huangjun Zhu Aug 7 '14 at 18:50
• @user56827: I don't know about an English translation, but there are many authors who work on this equation (e.g. see MathSciNet). These authors might know about a source (e.g. lecture notes or a book) where the proof is available in English. If I were you, I would contact the experts by email. – GH from MO Aug 7 '14 at 19:34
• I seemed to recall it being proved in Ribenboim's book about Catalan's conjecture (published before Mihailescu solved it), and, indeed, Shorey writes that it is (on p. 111, apparently) in his MathSciNet review of the book: ams.org/mathscinet-getitem?mr=95a:11029. – Daniel m3 Aug 7 '14 at 19:37
• Thanks, finally I find the book and a proof there from page 110. – Huangjun Zhu Oct 7 '14 at 21:21
• @user56827: A scan and a (partial?) English translation of Ljunggren's paper is available here: mathoverflow.net/questions/206645/… – GH from MO May 19 '15 at 0:07