<s>[INST] 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?
 [/INST] 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.
</s>