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.
Asked
Active
Viewed 275 times
2
-
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 05:15
-
$M_{82589933}$ is a self number. – Barry P Apr 11 '19 at 05:16
-
Related: (59223) – Mr.Wizard Apr 11 '19 at 08:04
1 Answers
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