Mersenne primes problem Well, I need someone here with programming skills (because I have none of it) to check if this problem that I am proposing is at least true for the known Mersenne primes, and here is the list of the exponents of the known Mersenne primes :
http://wwwhomes.uni-bielefeld.de/achim/mersenne.html
And the problem is:
If the number $M_p=2^p-1$ is prime then it can be written in one of the two following forms:
$M_p=18k+1$ or $M_p=18k+13$, for $p\geq5$, that is, Mersenne primes, when divided with $18$ leave a remainder that is equal to $1$ or equal to $13$.
I feel that this is quite easy to program but since my skills in programming are practically non-existent it would be so nice if someone here would do that job for me (and for himself if he is interested in this kind of problems).
If this is a proven fact about Mersenne primes then please tell me where I can find the proof because I did not find fact of this kind when I was reading about known facts about Mersenne primes, and I am sorry if this is something quite elementary beacuse I already posted some questions which turned out to be homework-type problems and I did not see it in the moment of posting. Thank you.
 A: No programming skills are needed, not even a computer, or even pocket-calculator ;) 
Look, $M_p = 2^p - 1$ is congruent $1$ or $13$ modulo $18$ (which is what you are asking) if and only if $2^p$ is $2$ or $14$ modulo $18$. 
Now, modulo $18$, one has $2^1=2$, $2^2=4$, $2^3= 8$, $2^4= 16$, $2^5= 14$, $2^6=10$, $2^7=2$.
Thus, $2^n$ is congruent $2$ modulo $18$ if and only if $n$ is $1$ modulo $6$, 
and  $2^n$ is congruent $14$ modulo $18$ if and only if $n$ is $5$ modulo $6$.
Since every prime (except $2,3$) is $1$ or $5$ modulo $6$, and the exponent for a Mersenne-prime is a prime number the claim follows. 
A: It is an easy exercise to prove your statement for all Mersenne primes, not just the known ones, using that $2^6\equiv 1\pmod{9}$. Indeed, $p$ must be prime for $M_p=2^p-1$ to be prime. Hence either $p\equiv 1\pmod{6}$ in which case $M_p\equiv 2^1-1\equiv 1\pmod{9}$ and so $M_p\equiv 1\pmod{18}$, or $p\equiv 5\pmod{6}$ in which case $M_p\equiv 2^5-1\equiv 4\pmod{9}$ and so $M_p\equiv 13\pmod{18}$. I told you earlier that your questions are not of research level. Try MathStackExchange next time.
