2

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.

user64494
  • 26,149
  • 4
  • 27
  • 56
Barry P
  • 23
  • 2

1 Answers1

6

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

ZaMoC
  • 6,697
  • 11
  • 31