Relaxing the size constraints on the criterion of Proth
Tejas R. Rao

TL;DR
This paper extends Proth's primality test to larger numbers by adding a simple, efficient condition that preserves the test's biconditionality and can be computed concurrently, broadening its applicability.
Contribution
The authors introduce a new condition to Proth's theorem, allowing it to test a wider class of numbers without added complexity, and discuss an extension to an existing primality test.
Findings
Extended Proth's theorem to larger numbers
Maintained the theorem's biconditionality
Added minimal computational complexity
Abstract
We add one condition to the theorem of Proth to extend its applicability to where as opposed to the former constraint of . This additional condition adds barely any complexity or time to the test and can furthermore be calculated concurrently. Furthermore, it maintains the biconditionality of the theorem and thus makes it readily applicable. A note on an extension of the primality test of Brillhart, Lehmer, and Selfridge is also made.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Combinatorial Mathematics · Analytic Number Theory Research · Limits and Structures in Graph Theory
Relaxing the size constraints on Proth’s criterion
Tejas R. Rao
Abstract. We add one condition to Proth’s theorem to extend its applicability to where as opposed to the former constraint of . This additional condition adds barely any complexity or time to the test and can furthermore be calculated concurrently. Furthermore, it maintains the biconditionality of Proth’s theorem and thus makes it readily applicable. A note on an extension of Brillhart, Lehmer, and Selfridge’s primality test is also made.
The famous Proth primality test is an adaption of Pocklington’s criterion and has been the subject of dedicated computation (1). It states that , where is odd and is prime if and only if
,
for all where \mathchoice{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{0}{a}{N}}}\kern-9.12497pt\vbox{\hbox to9.12497pt{\kern-1.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-1.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{1}{\vphantom{1}a}{\vphantom{1}N}}}\kern-9.88748pt\vbox{\hbox to9.88748pt{\kern-0.5pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-0.5pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{2}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{3}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}=-1. However, the size constraints require that , or about that . Another famous extension of Pocklington’s criterion is as follows. From Brillhart, Lehmer, and Selfridge, we know that, for , where is prime and is a positive integer, if
[TABLE]
then is prime (5). Note that this criterion is significantly weaker because it is not biconditional. Proth’s test is deterministic for any chosen because \mathchoice{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{0}{a}{N}}}\kern-9.12497pt\vbox{\hbox to9.12497pt{\kern-1.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-1.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{1}{\vphantom{1}a}{\vphantom{1}N}}}\kern-9.88748pt\vbox{\hbox to9.88748pt{\kern-0.5pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-0.5pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{2}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{3}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}} may be easily calculated using quadratic reciprocity (2, 4). However, the test of Brillhart, Lehmer, and Selfridge requires random chance in choosing an , and additionally does not prove is composite. In this paper, we relax the size constraints on in Proth’s test by utilizing the techniques found in (1).
We begin with the following proposition, utilizing a similar method of proof as Brillhart, Lehmer, and Selfridge do (5).
Theorem 1**.**
For , if
[TABLE]
then is prime.
If but , then . If , and since , where represent the highest powers of each prime factor of , at least one prime factor must satisfy . But since, from (3), for some , and since , we know . Therefore, since is prime, we can write
.
Alternatively, . So, . But since , we know , and thus is precisely and is prime.
This extension is valid, but not as strong as that of Proth because, again, it is not biconditional. However, utilizing quadratic reciprocity and techniques from (1), we can relax the size criterion on Proth’s primality test. Recall that for all primes,
a^{\frac{N-1}{2}}\equiv\mathchoice{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{0}{a}{N}}}\kern-9.12497pt\vbox{\hbox to9.12497pt{\kern-1.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-1.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{1}{\vphantom{1}a}{\vphantom{1}N}}}\kern-9.88748pt\vbox{\hbox to9.88748pt{\kern-0.5pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-0.5pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{2}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{3}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}=-1\mod N
for all where \mathchoice{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{0}{a}{N}}}\kern-9.12497pt\vbox{\hbox to9.12497pt{\kern-1.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-1.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{1}{\vphantom{1}a}{\vphantom{1}N}}}\kern-9.88748pt\vbox{\hbox to9.88748pt{\kern-0.5pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-0.5pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{2}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{3}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}=-1. Combine this with the following theorem.
Theorem 2**.**
For , where is odd and , is either prime or semiprime if
.
By the conditions, , and thus . Additionally, since it is congruent to , we know that, for each prime factor of , . Since is odd, all prime factors are greater than and thus
.
Because of this we know that for all prime factors of . Thus,
.
Therefore, for all prime factors . But also . So . But since , so is precisely and is thus either prime or semiprime.
Combining the two aforementioned statements, we know that for a prime with , . In the other direction, if , then is either prime or semiprime. We can easily determine whether is semiprime given the constraints. Specifically, we utilize the fact that if , then . If is semiprime and satisfies the aforementioned conditions, then we may write . Since , we know (if , then because of the small values of , the inequality less than will still hold). Therefore, we can find by calculating and by calculating . Solving this system of equations, we can find and thus the prime factors and . Thus, if and only if the solution is not an integer, is prime. This means we have the following conditions after solving the system.
Theorem 3**.**
For , odd, \mathchoice{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{0}{a}{N}}}\kern-9.12497pt\vbox{\hbox to9.12497pt{\kern-1.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-1.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{1}{\vphantom{1}a}{\vphantom{1}N}}}\kern-9.88748pt\vbox{\hbox to9.88748pt{\kern-0.5pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern-0.5pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{2}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}{\mathopen{}\left(\kern-1.0pt\vbox{\hbox{\set@color\genfrac{}{}{0.0pt}{3}{\vphantom{1}a}{\vphantom{1}N}}}\kern-7.06247pt\vbox{\hbox to7.06247pt{\kern 0.0pt\cleaders\hbox{\kern 0.5pt\vrule height=0.2pt,depth=0.2pt,width=1.0pt\kern 0.5pt}\hfil\kern 0.0pt}}\kern-1.0pt\right)\mathclose{}}=-1, and , is prime if and only if
[TABLE]
where
**
Furthermore, if , then is semiprime and its factors are given by and as defined above. The second condition only requires a few modular multiplications to calculate and thus does not add significant complexity to the test. Additionally, regardless of the outcome of the second condition, at least one and up to two primes will be discerned ( or its factors). If , the second condition may be removed.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Keller, W. Factors of Fermat Numbers and Large Primes of the Form k 2 n + 1 𝑘 superscript 2 𝑛 1 k 2^{n}+1 . Mathematics of Computation , 41 (1983), 661-673
- 2[2] Rao, T. R. An open source software package for primality testing of numbers of the form p 2n+1, with no constraints on the relative sizes of p and 2n. Peer J , (2018) · doi ↗
- 3[3] Rao, T. R. Primitive Indexes, Zsigmondy Numbers, and Primoverization . Cornell University Library , (2018)
- 4[4] Rao, T. R. Effective Primality Test for p 2 n + 1 𝑝 superscript 2 𝑛 1 p 2^{n}+1 , p 𝑝 p prime, n > 1 𝑛 1 n>1 . Cornell University Library , (2018)
- 5[5] Brillhart, John; Lehmer, D. H.; Selfridge, J. L. New Primality Criterion and Factorizations of 2 m ± 1 plus-or-minus superscript 2 𝑚 1 2^{m}\pm 1 . Mathematics of Computation , (1975) 29 (130): 620–647
