-
Notifications
You must be signed in to change notification settings - Fork 0
Home
StevenJinyanCheng edited this page Nov 4, 2024
·
9 revisions
Currently version 1.1, requires tqdm
, gmpy2
.
proth.py
is a python source code, implementing Proth's primality test for k * 2 ^ n + 1 with k < 2 ^ n.
Use git clone: git clone https://github.com/StevenJinyanCheng/prime-search.git
or download raw.
- help:
python3 proth.py -h
- usage: proth.py [-h] [--min-k MIN_K] [--max-k MAX_K] [--max-a MAX_A] [--vfalse] [--vprinti] [--vnores] n
search prime in the form
k * 2 ^ n + 1
with min-k <= k <= max-k.--vfalse
: not recommended, print if k * 2 ^ n + 1 is not a prime.--vprinti
: not recommended, printProth test ...
.--vnores
recommended, print if there is no result.
I found primes with 1000, 1200, 1400, 1500, 1600, 1800, 2000, 2250, 2500, 2600, 2700, 2800, 3000, 3200, 3400, 3500, 3600, 3700, 3800, 4000, 4500, 5000 digits. the current largest prime is 555 * 2^16609 + 1 with 5003 digits.
Added sieve, it can sieve more than 90% of the numbers (aka 10x speedup?)