This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{[ | |
2022202116, | |
1777034894, | |
1000032472, | |
399866798, | |
314187728, | |
271643232, | |
232050760, | |
231583998, | |
231295516, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F__={[\\ needs parisizemax >= 600M; from http://www.prothsearch.com/fermat.html | |
[3], \\ F0 | |
[5], | |
[17], | |
[257], | |
[65537], | |
[641, 6700417], | |
[274177, 67280421310721], | |
[59649589127497217, 5704689200685129054721], | |
[1238926361552897, "P62"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{[ | |
"10^2000007-10^1127194-10^872812-1", | |
"10^2000005-10^1051046-10^948958-1", | |
"10^1888529-10^944264-1", | |
"10^1234567-20342924302*10^617278-1", | |
"10^1234567-1927633367291*10^617277-1", | |
"10^1234567-3626840486263*10^617277-1", | |
"10^1234567-4708229228074*10^617277-1", | |
"10^490000+3*(10^7383-1)/9*10^241309+1", | |
"10^474500+999*10^237249+1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://www.mersenneforum.org/showthread.php?t=29584 | |
Factors 300 decimal digits semiprime n, knowing its prime factors consist of | |
digits 3 and 7 only, 10,000 times in less than 1s in total on 7950X CPU. | |
f=puzzle | |
g++ -O3 -Wall -Wextra -pedantic $f.cc -o $f -lgmp -lgmpxx | |
cpplint --filter=-legal/copyright,-runtime/references $f.cc | |
cppcheck --enable=all --suppress=missingIncludeSystem $f.cc --check-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P=extern("curl -s https://oeis.org/A080076/a080076.json.txt"); | |
p2=eval(getenv("p2")); | |
r=eval(getenv("r")); | |
doit(r)={ | |
for(m=r[1],r[2], | |
cnt=Vec(0,2^p2); | |
foreach(P,p,if(2^m<p&&p<2^(2*m),cnt[1+(p>>m)>>(m-p2)]++)); | |
print(m," ",cnt," (0..",2^(p2)-1,") vecsum=",vecsum(cnt)); | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\\ detemine count of Proth primes until environment n | |
\\ environment l (loops) allows to tune work distribution | |
\\ | |
\\ based on Karim's isProth2(): | |
\\ https://pari.math.u-bordeaux.fr/archives/pari-users-2403/msg00064.html | |
\\ and Bill's parallel implementation: | |
\\ https://pari.math.u-bordeaux.fr/archives/pari-users-2403/msg00067.html | |
\\ | |
isProth2(p) = !(p >> (valuation(p-1,2)<<1)); | |
export(isProth2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//======================================================================= | |
// Distributed under the Boost Software License, Version 1.0. (See | |
// accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt) | |
/* | |
f=dot2leda | |
g++ -O3 -Wall -pedantic -Wextra $f.cpp -o $f -lboost_graph | |
cpplint --filter=-legal/copyright,-build/namespaces $f.cpp | |
cppcheck --enable=all --suppress=missingIncludeSystem $f.cpp --check-config | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//======================================================================= | |
// Distributed under the Boost Software License, Version 1.0. (See | |
// accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt) | |
// | |
// f=straight_line_graphviz | |
// g++ -O3 -Wall -pedantic -Wextra $f.cpp -o $f | |
// cpplint --filter=-legal/copyright,-build/namespaces $f.cpp | |
// cppcheck --enable=all --suppress=missingIncludeSystem $f.cpp --check-config | |
//======================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" view graphviz file """ | |
# pylint: disable=C0103 | |
import sys | |
import webbrowser | |
import urllib.parse | |
import time | |
if len(sys.argv)<3: | |
print("Format: "+sys.argv[0]+" browser dotfile") | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phi(n,x)=polcyclo(n,x); | |
{ | |
P=[ | |
-516693^1048576, -465859^1048576, -123447^524288, -143332^393216, | |
-844833^262144, -712012^262144, -558640^196608, -237804^196608, 93606^177147, | |
55599^177147, -1082083^131072, -843575^131072, -362978^131072, -192098^131072, | |
-1202113^98304, -1110815^98304, -700219^98304, -660955^98304, -535386^98304, | |
-406515^98304, -107970^98304, -62721^98304, -1538654^65536, -1456746^65536, | |
-1427604^65536, -1395583^65536, -1181782^65536, -1147980^65536, -984522^65536, |
NewerOlder