How to know that whether any Mersenne Number, $M_{m}$ whether is a prime, or composite?
I have learnt that $M_{m}=2^m-1$ , for $m$ is any positive interger.
And there is a theorem, says that :
if $p$ is odd prime, then any divisor of Mersenne number is of the form $2kp + 1$, where $k$ is a positive integer.
Then I have carried out an example by plugging $m=37$,
$M_{37}=2^{37}-1=137438953471$ (although I know that it is not a prime), and
we have $q=2kp+1=2k(37)+1 =74k+1$
For
$k=2,q=149\longrightarrow$ Since $149$ is not the divisor for $M_{37}$, so this implies that $M_{37}$ is currently a prime.
$k=3,q=223\longrightarrow$ Since $223$ is the divisor for $M_{37}$, so this implies that $M_{37}$ is immediately not a prime.
$\therefore M_{37}$ is not a prime.
Do my reasoning is correct? Can anyone give me a comment about it? Also, can I start with using $k=1$ ?
Will be very thankful !
Yes, it is correct, but you should no say that “$M_{37}$ is currently a prime”; at this moment, you simply do not know whether or not it is a prime number.
And, yes, you can start with $k=1$. Take $M_{11}(=2047)$, for instance. If $k=1$, then $q=23$. And, in fact, $23\mid2047$.