Why this happens with numbers of Mersenne type that are prime? If we define the function $f$ on $\mathbb N$ as $f(n)$ is the "iterative sum of the digits of $n$ until we arrive at the single digit", for example $f(123456789)=f(45)=f(9)=9$ then if $M_p$ is a Mersenne prime it seems, at least for the known Mersenne primes, that $f(M_p)\in \{1,4\}$ if $M_p>7$. 
So I would like, if it is hard to find the proof, that you give me some heuristic arguments on why this happens?
 A: Note that your function is almost just taking number $\pmod 9$, for instance $123456789 = 0 = 9 \pmod 9$. This is because $10 = 1 \pmod 9$, so $a_n 10^n + a_{n-1} 10^{n-1} + \ldots + a_1 10 + a_0 = a_n 1^n + a_{n-1} 1^n + \ldots + a_1 1 + a_0 \pmod 9$, so both a number and sum of its digits give the same remainder modulo 9. Iterating, we reach the single digit. The only difference with your function is that taking $\pmod 9$ gives you 0, when your function gives 9.
Since $\phi(9) = 6$, by Euler's theorem you have $2^p - 1 = 2^{p \pmod 6} - 1 \pmod 9$. Now, since $p$ is prime, for $p > 6$ you have $p \pmod 6 = 1$ or $5$. For the first case you have $2^p - 1 = 2^1 - 1 = 1 \pmod 9$, and for the other $2^5 - 1 = 31 \pmod 9 = 4$.
A: Don't know whether it's a perfect one. I have tried this way.:)
Consider a number $a_na_{n-1}a_{n-2}..a_0$
$=a_na_{n-1}a_{n-2} \dots a_0$
$10^n.a_n+10^{n-1}.a_{n-1}+ \dots10^0.a_0 \equiv 10^n.a_n+10^{n-1}.a_{n-1}+ \dots10^0.a_1 \ \mod 9$
$10^n.a_n+10^{n-1}.a_{n-1}+ \dots10^0.a_0 -(a_0+a_1+\dots a_n) \equiv0 \mod 9$ 
$a_na_{n-1}+\dots a_1 \equiv a_0+a_1+\dots a_n \mod 9$
Observe the cyclicity of powers with respect to $\mod 9$
$2^{6k}\equiv 1 \mod 9 $
$2^{6k-1}\equiv -4 \mod 9 $
$2^{6k-2}\equiv -2 \mod 9 $
$2^{6k-3}\equiv -1 \mod 9 $
$2^{6k-4}\equiv 4 \mod 9 $
$2^{6k-5}\equiv 2 \mod 9 $
$p$ is a a prime such that $2^p-1$ is also a prime.
$p$ has to be of the form $6k-1$ or $6k-5$
Therefore, 
$2^{6k-1}-1 \equiv -5 \mod 9 \implies 4 \mod 9$
$2^{6k-5}-1 \equiv 1 \mod 9 \implies 1 \mod 9$
