Proth Number Calculator

k·2^n + 1 primes

CalculatorsFreeNo Signup
4.8(741 reviews)
All Tools

Loading tool...

About Proth Number Calculator

A Proth number calculator generating numbers of the form k·2^n + 1 with k odd and k < 2^n. Proth's theorem provides a deterministic primality test: if a^((P-1)/2) ≡ −1 (mod P) for some a, then P is prime. Shows generation and primality testing. Client-side.

Proth Number Calculator Features

  • Proth generation
  • Primality test
  • Proth's theorem
  • k and n inputs
  • Sequence
Proth numbers: k·2^n+1 with k odd, k<2^n. Proth's theorem: P is prime if ∃a with a^((P-1)/2)≡−1(mod P). This is deterministic and fast! Used in the search for large primes. The largest known Proth prime has millions of digits.

How to Use

Enter k and n:

  • Proth number: k·2^n+1
  • Primality: Proth's test
  • Sequence: List of Proths

Proth's Theorem

If P=k·2^n+1 with k<2^n, and a^((P-1)/2)≡−1(mod P) for some a, then P is prime. Common choices: a=3. This is remarkably efficient — O(n²) bit operations. No false positives possible!

Records

Many of the largest known primes are Proth primes. The distributed computing project PrimeGrid searches for large Proth primes. They're faster to test than general numbers because of Proth's efficient theorem.

Step-by-Step Instructions

  1. 1Enter k (odd).
  2. 2Enter n.
  3. 3Compute k·2^n+1.
  4. 4Test primality.
  5. 5View sequence.

Proth Number Calculator — Frequently Asked Questions

Why must k < 2^n?+

This ensures k·2^n+1 is 'dominated' by the 2^n term, making Proth's theorem applicable. Without this condition, the number is just a general odd number and Proth's efficient test doesn't apply.

How is Proth's test different from Miller-Rabin?+

Miller-Rabin is probabilistic (can have false positives). Proth's test is DETERMINISTIC for Proth numbers — if you find an a with a^((P-1)/2)≡−1, P is definitely prime. No probability involved. This makes it superior for numbers of the right form.

What's the connection to Fermat numbers?+

Fermat number F_n = 2^{2^n}+1 = 1·2^{2^n}+1. This is a Proth number with k=1! So Proth's theorem can test Fermat numbers for primality. Pépin's test (the standard Fermat primality test) is actually a special case of Proth's theorem.

Share this tool: