Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Last active November 16, 2024 22:10
Show Gist options
  • Save Hermann-SW/f44c3500b8db158eb87ae8c2fd010e21 to your computer and use it in GitHub Desktop.
Save Hermann-SW/f44c3500b8db158eb87ae8c2fd010e21 to your computer and use it in GitHub Desktop.
Mersenne prime exponents (52 sofar)
{mpe=[
2,
3,
5,
7,
13,
17,
19,
31,
61,
89,
107,
127,
521,
607,
1279,
2203,
2281,
3217,
4253,
4423,
9689,
9941,
11213,
19937,
21701,
23209,
44497,
86243,
110503,
132049,
216091,
756839,
859433,
1257787,
1398269,
2976221,
3021377,
6972593,
13466917,
20996011,
24036583,
25964951,
30402457,
32582657,
37156667,
42643801,
43112609,
57885161,
74207281,
77232917,
82589933,
136279841
]}
2
3
5
7
13
17
19
31
61
89
107
127
521
607
1279
2203
2281
3217
4253
4423
9689
9941
11213
19937
21701
23209
44497
86243
110503
132049
216091
756839
859433
1257787
1398269
2976221
3021377
6972593
13466917
20996011
24036583
25964951
30402457
32582657
37156667
42643801
43112609
57885161
74207281
77232917
82589933
136279841
@Hermann-SW
Copy link
Author

Computing binary length of 52 perfect numbers takes 4 seconds in total:

hermann@7950x:~$ gp -q mpe.gp
? c=1;foreach(mpe,e,print(c,": ",#binary(2^(e-1)*(2^e-1)));c+=1)
1: 3
2: 5
3: 9
4: 13
5: 25
6: 33
7: 37
8: 61
9: 121
10: 177
11: 213
12: 253
13: 1041
14: 1213
15: 2557
16: 4405
17: 4561
18: 6433
19: 8505
20: 8845
21: 19377
22: 19881
23: 22425
24: 39873
25: 43401
26: 46417
27: 88993
28: 172485
29: 221005
30: 264097
31: 432181
32: 1513677
33: 1718865
34: 2515573
35: 2796537
36: 5952441
37: 6042753
38: 13945185
39: 26933833
40: 41992021
41: 48073165
42: 51929901
43: 60804913
44: 65165313
45: 74313333
46: 85287601
47: 86225217
48: 115770321
49: 148414561
50: 154465833
51: 165179865
52: 272559681
? ##
  ***   last result computed in 3,999 ms.
? 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment