Square root of a Mersenne number is irrational Defining a Mersenne Number like this:
k = $2^n -1$
I have to prove that the square root of a Mersenne number is irrational (has no solution in $\mathbb Q$). I know that it can be proven that the square root of a non-perfect square number is always irrational, but is there a particular proof for a Mersenne Number?
 A: All perfect squares are either $1$ or $0 \mod 4$. Writing $2^n - 1$ in binary, we get $1111...11$, and when you divide that by $4$, which is using only the two right most digits (the rest of the digits are a multiple of $100$), it's clear that all Mersenne numbers are $3 \mod 4$, except when $n = 0, 1$. 
A: In binary, $2^n - 1$ is:
$$
111...1\text{, } n \text{ } 1\text{'s}
$$ 
We can attempt to construct a number that squared gives this, start with $1\times1 = 1$ (that works).  Obviously both numbers must be odd (since $2^n - 1$ is certainly odd).  Now let's try to add to this to still get all $1$'s:
\begin{align}
&0011 \\
\times & 0011 \\\hline\\
&0011 \\
+& 0110 \\\hline\\
&1001
\end{align}
We can't possibly put $01$ as a test since this is just $1\times1 = 1$.  Does it matter what comes next?  What if it should have been:
\begin{align}
&00101 \\
\times & 00101 \\\hline\\
&00101 \\
& 00000 \\
+&10100\\\hline
&11001
\end{align}
Right away, you see that the "second" digit cannot possibly be $0$.  This invariably gives $01$ as the last two digits which cannot possibly represent a $2^n - 1$ number.  So the $2^\text{nd}$ digit must be $1$, let's try that:
\begin{align}
&000111 \\
\times & 000111 \\\hline\\
&000111 \\
& 001110 \\
+&011100\\\hline
&xxxx01
\end{align}
This should not be surprising because we already showed above that $11\times11 \neq 2^n - 1$.  If the next digit cannot be $0$ and it cannot be $1$, then there is no possible next digit and thus $2^n - 1$ must not be a perfect square unless $n = 1$ such that $2^1 - 1 = 1 = 1\times1$.
All of this follows from the fact that $(4x + 1)^2 = 16x^2 + 8x + 1 = 1 \pmod{4}$ and $(4x + 3)^2 = 16x^2 + 24x + 9 = 1 \pmod{4}$ whereas $2^n - 1 = 2^n - 4 + 3 = 4(2^{n - 2} - 1) + 3 = 3 \pmod{4}$ (when $n \geq 2$).  Since the modulus isn't equal, the values cannot possibly be equal (unless $x = 0$ and we have $1^2 = 1 = 2^1 - 1$).
(we don't need to check $(4x + 2)^2$ or $(4x + 0)^2$ because these numbers are divisible by $2$ and thus certainly not equal to $2^n - 1$ which is definitely not divisible by $2$)
edit All of the above assumes $n > 0$.  You can manually see that if $n=0$ you get $2^0 - 1 =1-1= 0 = 0^2$.  For negative $n$, it's trivially true that the square root is irrational since you would get a negative number which would at the very least require an $i$, which is irrational.
A: If you want to prove this for Mersenne numbers specifically without showing anything about non-perfect squares, maybe the following works. It is a very simple proof by contradiction, thus, I am skeptical that it is valid. I would like some feedback on that.
By way of contradiction, suppose that, with integers a and b sharing no common divisors other than 1, and n > 1
$$ \frac{a}{b} = \sqrt(2^n - 1) $$
$$ \frac{a^{2}}{b^{2}} = 2^{n} - 1 $$
$$ \frac{a^{2}}{{b}^2} + 1 = 2^n $$
Then a^2 / b^2 is odd, because 2^n is even. Then, either a^2 and b^2 are both even, or a^2 and b^2 are both odd. If both are even, then a and b are both even, and so we have a contradiction, since a and b must share no common divisors other than 1 (infinite descent).
If a^2 and b^2 are both odd, then a and b are both odd. Now, with that in mind:
$$ \frac{a^{2}}{b^{2}} + 1 = 2^{n} $$
$$ a^{2} + b^{2} = (2^{n})(b^{2}) $$
Now, a and b are both odd in this case. So let a = 2x + 1 and b = 2y + 1. Then:
$$ (2x + 1)^{2} + (2y + 1)^{2} = (2^{n})(b^{2}) $$
$$ 4x^{2} + 4x + 4y^{2} + 4y + 2 = (2^{n})(b^{2}) $$
$$ 2(2x^{2} + 2x + 2y^{2} + 2y + 1) = (2^{n})(b^{2}) $$
$$ 2(2(x^{2} + x + y^{2} + y) + 1) = (2^{n})(b^{2}) $$
$$ 2(x^{2} + x + y^{2} + y) + 1 = (2^{(n-1)})(b^{2}) $$
The left hand side is odd. Note that on the right hand side, 2^(n-1) is an even number, since n > 1. Also, b^2 is odd, in this case. An even times an odd is always even. Thus, we have an odd equal to an even. Contradiction.
Since we have a contradiction in both cases, the proof is complete.
