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

Using this repo to compute the number of Collatz steps to reach 1 for Mersenne primes:
https://github.com/Boutoukoat/Collatz-steps-on-large-numbers

hermann@7950x:~/Collatz-steps-on-large-numbers$ for p in `cat mpe.txt`
> do
> ./collatz 2^$p-1
> done
f(2^2-1)=           7, time=       0.000 msecs.
f(2^3-1)=          16, time=       0.000 msecs.
f(2^5-1)=         106, time=       0.000 msecs.
f(2^7-1)=          46, time=       0.000 msecs.
f(2^13-1)=         158, time=       0.001 msecs.
f(2^17-1)=         224, time=       0.001 msecs.
f(2^19-1)=         177, time=       0.000 msecs.
f(2^31-1)=         450, time=       0.001 msecs.
f(2^61-1)=         860, time=       0.003 msecs.
f(2^89-1)=        1454, time=       0.004 msecs.
f(2^107-1)=        1441, time=       0.005 msecs.
f(2^127-1)=        1660, time=       0.005 msecs.
f(2^521-1)=        6769, time=       0.023 msecs.
f(2^607-1)=        8494, time=       0.027 msecs.
f(2^1279-1)=       17094, time=       0.060 msecs.
f(2^2203-1)=       29821, time=       0.106 msecs.
f(2^2281-1)=       30734, time=       0.110 msecs.
f(2^3217-1)=       43478, time=       0.162 msecs.
f(2^4253-1)=       55906, time=       0.217 msecs.
f(2^4423-1)=       60716, time=       0.241 msecs.
f(2^9689-1)=      129608, time=       0.537 msecs.
f(2^9941-1)=      134345, time=       0.571 msecs.
f(2^11213-1)=      153505, time=       0.645 msecs.
f(2^19937-1)=      265860, time=       1.240 msecs.
f(2^21701-1)=      293161, time=       1.416 msecs.
f(2^23209-1)=      312164, time=       1.499 msecs.
f(2^44497-1)=      598067, time=       3.430 msecs.
f(2^86243-1)=     1158876, time=       7.599 msecs.
f(2^110503-1)=     1482529, time=      10.230 msecs.
f(2^132049-1)=     1771117, time=      12.962 msecs.
f(2^216091-1)=     2906179, time=      24.182 msecs.
f(2^756839-1)=    10197081, time=     124.019 msecs.
f(2^859433-1)=    11568589, time=     143.369 msecs.
f(2^1257787-1)=    16927967, time=     231.768 msecs.
f(2^1398269-1)=    18807193, time=     260.734 msecs.
f(2^2976221-1)=    40055567, time=     598.966 msecs.
f(2^3021377-1)=    40663017, time=     611.355 msecs.
f(2^6972593-1)=    93778449, time=    1668.907 msecs.
f(2^13466917-1)=   181209792, time=    3711.189 msecs.
f(2^20996011-1)=   282515044, time=    6374.542 msecs.
f(2^24036583-1)=   323346876, time=    7544.952 msecs.
f(2^25964951-1)=   349304386, time=    8219.169 msecs.
f(2^30402457-1)=   409093991, time=    9852.700 msecs.
f(2^32582657-1)=   438465334, time=   10895.232 msecs.
f(2^37156667-1)=   499902411, time=   12752.495 msecs.
f(2^42643801-1)=   573966881, time=   15098.354 msecs.
f(2^43112609-1)=   580260946, time=   15322.592 msecs.
f(2^57885161-1)=   779044992, time=   21504.731 msecs.
f(2^74207281-1)=   998401306, time=   29281.502 msecs.
f(2^77232917-1)=  1039248803, time=   30659.054 msecs.
f(2^82589933-1)=  1111148968, time=   33169.349 msecs.
f(2^136279841-1)=  1833585702, time=   60145.571 msecs.
hermann@7950x:~/Collatz-steps-on-large-numbers$ 

@Hermann-SW
Copy link
Author

http://arxiv.org/pdf/1104.2804v1
"A Conjecture on the Collatz-Kakutani Distance for the Mersenne Prime Numbers"
Toru Ohira, Hiroshi Watanabe

Let us introduce the “Collatz-Kakutani distance” D(X) for a number of steps for X to reach X = 1

$D(M_n) \approx 13.45n$
(from 2011, only 47 Mersenne primes were known at that time — today 52 are known)
image

@Hermann-SW
Copy link
Author

hermann@7950x:~$ gp -q mpe.gp
? #mpe
52
? foreach(mpe,e,print1(kronecker(-3,2^e-1)))
0111111111111111111111111111111111111111111111111111
? mpe[52]
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