# The sum of digits of Mersenne primes

I have problem to calculate the sum of digits of the mersenne primes $$M_{57885161}$$ , $$M_{74207281}$$ , and $$M_{77232917}$$. I'm not a 'computer guy', but I know that the sum of digits of $$M_{82589933}$$ is $$111879913$$. Could you help me ? Thanks.

• I want to test the selfness of these mersenne primes, and therefore we need the sum of digits of these primes – Barry P Apr 11 '19 at 5:15
• $M_{82589933}$ is a self number. – Barry P Apr 11 '19 at 5:16
• Related: (59223) – Mr.Wizard Apr 11 '19 at 8:04

## 1 Answer

try this

Total@IntegerDigits[2^57885161 - 1]


78434761

Total@IntegerDigits[2^74207281 - 1]


100537543

Total@IntegerDigits[2^77232917 - 1]


104621260

or use this function

M[x_]:=Total@IntegerDigits[2^x-1]
M[82589933]


111879913