Table of congruences

{{Short description|Mathematical concept}}

In number theory, a congruence is an equivalence relation on the integers. The following sections list important or interesting prime-related congruences.

Table of congruences characterizing special primes

class="wikitable"
style="text-align:center;"

! Congruence !! Explanation !! Known examples

2^{p-1} \equiv 1 \pmod{p}special case of Fermat's little theorem, satisfied by all odd prime numbers
2^{p-1} \equiv 1 \pmod{p^2}solutions are called Wieferich primes1093, 3511 ({{OEIS2C|A001220}})
F_{n - \left(\frac{{n}}{{5}}\right)} \equiv 0 \pmod{n}satisfied by all prime numbers
F_{p - \left(\frac{{p}}{{5}}\right)} \equiv 0 \pmod{p^2}solutions are called Wall–Sun–Sun primesno examples known
{2n-1 \choose n-1} \equiv 1 \pmod{n^3}by Wolstenholme's theorem satisfied by all prime numbers greater than 3
{2p-1 \choose p-1} \equiv 1 \pmod{p^4},solutions are called Wolstenholme primes16843, 2124679 ({{OEIS2C|A088164}})
(n-1)!\ \equiv\ -1 \pmod nby Wilson's theorem a natural number n is prime if and only if it satisfies this congruence
(p-1)!\ \equiv\ -1 \pmod{p^2}solutions are called Wilson primes5, 13, 563 ({{OEIS2C|A007540}})
4[(p-1)!+1]\ \equiv\ -p \pmod{p(p+2)}solutions are the twin primes

=Variants of Wilson's theorem=

For integers k \geq 1, we have the following form of Wilson's theorem:

:(k-1)! (p-k)! \equiv (-1)^k \pmod{p} \iff p \text{ prime. }

If p is odd, we have that

:\left(\frac{p-1}{2}\right)!^2 \equiv (-1)^{(p+1)/2} \pmod{p} \iff p \text{ an odd prime. }

=Clement's theorem concerning the twin primes=

Clement's congruence-based theorem characterizes the twin primes pairs of the form (p, p+2) through the following conditions:

: 4[(p-1)!+1] \equiv -p \pmod{p(p+2)} \iff p,p+2 \text{ are both prime. }

P. A. Clement's original 1949 paper {{cite journal|last1=Clement|first1=P. A.|title=Congruences for sets of primes|journal=Amer. Math. Monthly|date=1949|volume=56|issue=1|pages=23–25|doi=10.2307/2305816|jstor=2305816}} provides a

proof of this interesting elementary number theoretic criteria for twin primality based on Wilson's theorem.

Another characterization given in Lin and Zhipeng's article provides that

: 2 \left(\frac{p-1}{2}\right)!^2 + (-1)^{\frac{p-1}{2}} (5p+2) \equiv 0 \iff p,p+2 \text{ are both prime. }

=Characterizations of prime tuples and clusters=

The prime pairs of the form (p, p+2k) for some k \geq 1 include the special cases of the cousin primes (when k=2) and the sexy primes (when k=3). We have elementary congruence-based characterizations of the primality of such pairs, proved for instance in the article.{{cite journal|last1=C. Lin and L. Zhipeng|title=On Wilson's theorem and Polignac conjecture|journal=Math. Medley|date=2005|volume=6|arxiv=math/0408018|bibcode=2004math......8018C}} Examples of congruences characterizing these prime pairs include

:2k (2k)![(p-1)!+1] \equiv [1-(2k)!]p \pmod{p(p+2k)} \iff p,p+2k \text{ are both prime, }

and the alternate characterization when p is odd such that p \not{\mid} (2k-1)!!^2 given by

:2k(2k-1)!!^2 \left(\frac{p-1}{2}\right)!^2 + (-1)^{\frac{p-1}{2}}\left[(2k-1)!!^2(p+2k)-(-4)^k \cdot p\right] \equiv 0 \iff p,p+2k \text{ are both prime. }

Still other congruence-based characterizations of the primality of triples, and more general prime clusters (or prime tuples) exist and are typically proved starting from Wilson's theorem.See, for example, Section 3.3 in {{cite journal

| last = Schmidt | first = Maxie D.

| arxiv = 1701.04741

| journal = Integers

| mr = 3862591

| article-number=A78

| title = New congruences and finite difference equations for generalized factorial functions

| volume = 18

| year = 2018}}).

References