2
$\begingroup$

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.

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

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.