Skip to content
StevenJinyanCheng edited this page Nov 4, 2024 · 9 revisions

Welcome to the prime-search wiki!

Version

Currently version 1.1, requires tqdm, gmpy2.

What is it?

proth.py is a python source code, implementing Proth's primality test for k * 2 ^ n + 1 with k < 2 ^ n.

install

Use git clone: git clone https://github.com/StevenJinyanCheng/prime-search.git or download raw.

How to use it?

  • 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, print Proth test .... --vnores recommended, print if there is no result.

primes found

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.

What is new about Version 1.1

Added sieve, it can sieve more than 90% of the numbers (aka 10x speedup?)