Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to solve the equation $2^k-1 = x^2$, I have got one solution $k = 1$. How to proceed further i.e. either show that the equation has no more solutions or has more.


share|cite|improve this question
up vote 6 down vote accepted

Hint: Reduce the equality modulo 4.

share|cite|improve this answer

Like stated:
$k\ge 2 \Rightarrow$ $$ -1 \equiv x^2 \mod{4} $$ but

$-1$ is a non-quadratic residue modulo $4$ so there are no more.

But $k=0 \Rightarrow 2^k -1$ is a perfect square.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.