1. Introduction
We will call a congruence of the form
for prime p a modular Fermat equation (MFE). An MFE is non-trivial if no term is zero and we regard
and
.as the same solution. Some examples are
,
,
and even
. The reason this can occur so frequently with modular arithmetic can be understood by studying the bijectivity of the familiar function
given by
. This is not the Frobenius endomorphism, which would send an element of
to its pth power. Since the characteristic of
is p the Frobenius mapping would certainly be bijective, but we are interested in applying arbitrary nth powers to the elements of
and still retaining bijectivity. We assume
. Even values of n interfere with the bijectivity of
, so our discussion will be confined to odd
. We also note in passing that every Pythagorean triple generates a solution to an MFE with
.
Since
, we can limit our attention to the set
of non-zero residues modulo p. If
is bijective, then
returns a permuted copy of
as the set of nth power residues modulo p. It follows that for arbitrary
, the sum
, where
is guaranteed to be another nth power residue, say
. Then we have the MFE
. This matching process is essentially an application of the pigeonhole principle to the range of
. For any sum of two nth powers modulo p, there is a pigeon at home with that same address among the permuted nth residues. We arbitrarily rule out
as not being an (esthetically) proper solution. Also it is clear that if
or
, then y or x, respectively, would be forced to be zero, violating non-triviality. Now if
fails to be bijective, this guarantee is no longer assured, as
may not be among the nth power residues. In the sequel we offer an example where the bijectivity of
fails so drastically that no MFE can be constructed, and another where it fails only moderately but still allows the construction of an MFE. Our goal is to develop a criterion for
pairs that guarantees
is a bijection and will therefore support the formation of MFEs using the pigeonhole strategy.
2. Historical Note
In 1916 Issai Schur proved the combinatorial result known as Schur’s Lemma in Ramsey Theory [1] [2]. This asserts that given a palette of k colors with
, there is always an
such that a k-coloring of the set
would yield a monochromatic triple
satisfying the algebraic property
. As a corollary of this result he was able to show that Fermat’s Last Theorem is false in the context of modular arithmetic. Specifically, he established that for any
there is a prime
such that for all
the equation
has a solution. His proof is based on a Ramsey theory type argument which is summarized in [3]. As such, it is non-constructive, but it clarifies that for any n there are only finitely many moduli p for which an MFE cannot be constructed. It is not obvious that there is a general pattern among the
pairs for which this is true. Our focus is on the territory where
. Here solutions may or may not exist for specific
pairs. We develop a simple criterion that allows us to select those
pairs which guarantee that explicit solutions exist.
3. The Compatibility Criterion
A joint selection of n and p that assures the bijectivity of
will be called compatible. We now turn to developing a practical criterion for identifying compatible
pairs. Before proving the general result we explore a motivating case with small n and p. Let
and
. We have purposely chosen n and p such that
. Note that 2 is a primitive root of 13 and recall that the various powers of a primitive root for prime p generate the numbers 1 through
in some order [4]. The index I of such a number is its logarithm with respect to the primitive root as a base. For example, since
, the index
.
Example 1 We construct Table 1 as follows for the purpose of finding all solutions to
. The elements x of
are listed in order in Column 1. Their respective fifth powers reduced modulo 13 are listed in Column 2. Note that the entries in Column 2 repeat all of the entries in Column 1 but in a different order. This is a consequence of the fact that
is a permutation on
. In general this need not be the case for arbitrary n and p. Then Column 3 lists their respective indices relative to the primitive root 2 of 13. For example, if
, we have
, so
. Finally, in Column 4 we list the respective indices of the fifth powers of x, again relative to the primitive root 2 of 13. Recall that if
, then
, since indices are always reduced modulo
.
Table 1.
,
.
Column 1 |
Column 2 |
Column 3 |
Column 4 |
x |
x5 (mod 13) |
I2 (x) |
I2 (x5) (mod 12) |
1 |
1 |
0 |
0 |
2 |
6 |
1 |
5 |
3 |
9 |
4 |
8 |
4 |
10 |
2 |
10 |
5 |
5 |
9 |
9 |
6 |
2 |
5 |
1 |
7 |
11 |
11 |
7 |
8 |
8 |
3 |
3 |
9 |
3 |
8 |
4 |
10 |
4 |
10 |
2 |
11 |
7 |
7 |
11 |
12 |
12 |
6 |
6 |
Table 1 explains why there are many guaranteed solutions to
. To successfully use the matching strategy based on the pigeonhole principle described previously, we require that the fifth powers listed in Table 1, Column 2 be the numbers 1, 2, …, 12 in some order. Here is the chain of logic which shows this to be true in this case: The numbers 1, 2, …, 12 (Column 1) are given as distinct. Their respective indices relative to the primitive root 2 of 13 are distinct (Column 3) by the bijectivity of the index function (which is what makes the primitive root primitive). The respective indices of the fifth powers (Column 4) are calculated in turn from the entries in Column 3 by the Discrete Logarithm Rule which states that
. This rule is injective provided the
, which we confirm. Thus the entries in Column 4 are distinct. Finally, we again appeal to the bijectivity of the index function to conclude that the inverse mapping
establishes that the entries in Column 2 are the distinct numbers 1, 2, …, 12 in some order.
Now that we have shown that the fifth powers modulo 13 are the complete set of positive least residues, we can easily build all non-trivial solutions to
. Pick two different numbers from Column 1, say 5 and 11. Find their fifth powers modulo 13 in Column 2 and add. This gives 5 + 7 = 12. By the matching strategy we are guaranteed to find the number in Column 1 corresponding to 12 in Column 2. We conclude
. There are
choices of two different numbers from Column 1, and each pair gives a distinct proper solution to
.
We use a generalization of this argument to find a criterion for the compatibility of the pair
.
Theorem 1 (Criterion for Compatible Powers and Primes) Given
and p an odd prime, the function
permutes the set of residues
provided
. In particular, if
and
are not congruent modulo p, then neither are
and
.
Proof: Every prime has a primitive root, so let
be a primitive root of p. All indices will be calculated with respect to α. The elements x of
are listed in order in Table 2, Column 1. Their respective nth powers reduced modulo p are listed in Column 2. Their respective indices relative to the primitive root α are listed in Column 3. Finally, the indices relative to α of their respective nth powers are listed in Column 4, reduced modulo
.
Table 2. For Theorem 1.
Column 1 |
Column 2 |
Column 3 |
Column 4 |
x |
xn (modp) |
Iα (x) |
Iα (xn) (mod(p − 1)) |
1 |
1 |
0 |
0 |
2 |
2n (modp) |
Iα (2) |
nIα (2) |
3 |
3n (modp) |
Iα (3) |
nIα (3) |
|
|
|
|
x1 |
(modp) |
Iα (x1) = r |
Iα (
) = rn |
|
|
|
|
x2 |
(modp) |
Iα (x2) = s |
Iα (
) = sn |
|
|
|
|
(p − 1) |
(p − 1)n (modp) |
Iα (p − 1) |
nIα (p − 1) |
Suppose
and
are distinct least residues modulo p from Column 1 but for the sake of contradiction their nth powers are congruent modulo p in Column 2. So
. We know
and
are powers of the primitive root
, so suppose further that in Column 3
and
. It follows in Column 4 that
and
. These two indices in Column 4 must be congruent modulo
. So we now have
which implies
. By assumption,
, and since
, it must be the case that
and evidently
. This forces
, which contradicts the assumption that
and
are distinct least residues modulo p. We conclude that
and
cannot be congruent modulo p, and the function
is injective on the finite set
, and therefore bijective, as claimed. ◼
This theorem establishes a sufficient condition for the bijectivity of
, which, coupled with the matching strategy described above, allows the generation of explicit MFE’s in the manner illustrated.
Corollary 1-1 There are infinitely many primes for which MFEs are constructible
Proof: There are infinitely many odd primes and for each odd prime p, we may factor
into a product of primes to various powers according to the Fundamental Theorem of Arithmetic. Then we may choose any odd
that does not share any of the primes in this product. This construction will ensure
validating application of the theorem. We conclude there are infinitely many primes for which MFEs can be formed. ◼
Of course, Schur’s Theorem says the same thing, in fact it does so more inclusively since n need not be odd. But it offers no clue for constructing an example.
Corollary 1-2: Provided n and p are compatible, MFEs of the form
with
exist.
Proof: Given
we can always find
. Otherwise we are forced to conclude either
or
.◼
This is purely an esthetic nod to the classical form of Pythagorean triples.
Corollary 1-3: If
, then
for any triple
.
Proof: Note that
and likewise for the other terms. ◼
We have thus far dealt with compatible
pairs that have allowed construction of MFE solutions. We now briefly explore how incompatible
pairs can affect the existence of solutions.
4. Failed Bijectivity of ϕ
As indicated earlier, if
the set of nth power residues modulo p can shrink markedly from the full set
. Here is a catastrophic case where it is impossible to form any MFE’s. Let
and
, so
. We use the primitive root
again and generate the powers and indices in Table 3.
Table 3. An unsuccessful case.
Column 1 |
Column 2 |
Column 3 |
Column 4 |
x |
x9 (mod 13) |
I2 (x) |
I2 (x9) (mod 12) |
1 |
1 |
0 |
0 |
2 |
5 |
1 |
9 |
3 |
1 |
4 |
0 |
4 |
12 |
2 |
6 |
5 |
5 |
9 |
9 |
6 |
5 |
5 |
9 |
7 |
8 |
11 |
3 |
8 |
8 |
3 |
3 |
9 |
1 |
8 |
0 |
10 |
12 |
10 |
6 |
11 |
8 |
7 |
3 |
12 |
12 |
6 |
6 |
It is readily apparent from Table 3, Column 2 above that the ninth powers of the integers 1, 2, …, 12 are not distinct modulo 13. The respective indices relative to the primitive root 2 are listed in Column 3, and the injectivity of the index function ensures that there are no repeated values. However, in Column 4 we observe a collapse of injectivity. This is caused by the fact that
. Since indices are computed modulo
in this case, and
, we see the values of
repeating in cycles whenever
equals a multiple of 12. Table 4 makes the pattern obvious. Row 1 lists the indices of the various elements of
in the order of increasing index. Row 2 lists the indices of the corresponding ninth powers.
Table 4. Cyclic indices for x9.
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
|
9 |
6 |
3 |
0 |
9 |
6 |
3 |
0 |
9 |
6 |
3 |
0 |
It is easy to see what goes wrong. If 9 (=n) and 12 (=p − 1) were coprime there would only be one cycle terminating when
. The repeating cycles have length
in this example. It follows again from the injectivity of the index function that the corresponding ninth power residues must repeat in the same pattern as their indices. We are left with only
as the set of distinct ninth power residues modulo 13. By inspection it is clear that the matching strategy completely fails with only the numbers in this set available. We conclude that there is no admissible solution to an MFE ohe form
. The general result follows.
Theorem 2 (Counting Distinct nth Power Residues Modulo p) With the usual notation, the population of distinct nth power residues modulo p is
.
Proof: Referring again to Table 2 above (used to prove Theorem 1), suppose α is a primitive root of p. Suppose further that
and
are two distinct least residues modulo p with
and
. We claim that if i and j differ by the integer
, then
. Assuming
we can write
. Then
. This is certainly a multiple of
, and it follows that
. We conclude
, and since
, we have
, which by injectivity of the index mapping implies
, establishing the claim. So the nth powers repeat in cycles of length
and obviously there can only be
distinct nth power residues modulo p. ◼
Intuitively, we might suspect that the larger
is relative to p, the less likely it would be that the population of nth power residues can support construction of MFEs by the matching strategy. Here is an example where
but corresponding MFEs exist. Let
and
. So
. By Theorem 2 we would expect to find a fairly thin subset of six fifth power residues, and we easily determine that set to be
. There are several matches we can make with this reduced set, unlike the earlier case for
and
. For example, 1 + 5 = 6, 1 + 25 = 26, and 5 + 25 = 30. Now
can be partitioned into six equivalence classes where the elements within a class have equal 5th power residues modulo 31, namely the six distinct residues above. Each equivalence class has five members so there are apparently 375 distinct MFEs that can assembled from the three previous addition formulas. This clashes with our intuition. Only a fifth of
is available for piecing together fifth power MFEs, while a third of
is available for assembling ninth power MFEs. The smaller fraction leads to a profusion of MFEs, yet the larger fraction leads to none. Our sufficiency condition of Theorem 1 is far from being necessary.
The constraint we have presented on the number of nth power residues for a given prime p interacts with Schur’s Theorem in an interesting way. It may happen that an incompatible
pair may have
. Then
which implies there are
nth power residues modulo p. The only non-trivial MFEs that could be formed under these circumstances would be of the “improper” form
. Recalling Schur’s Theorem which states that there are solutions to
for any n and all primes p exceeding some threshhold
, we remark that cases could be constructed where
. This implies that the MFEs guaranteed by Schur’s theorem would necessarily be of the improper type.
5. Beyond MFEs
Finally, we note that the matching construction described above allows considerable extension [5] of the basic modular Fermat equation
. As long as the function
is bijective, the matching strategy will work and equations like
will have solutions. For example,
. We can also extend this by changing terms to their additive inverses relative to p and then moving them to the other side of the equation. Since
, the previous example can be written
and rearranged to
. The odd parity of admissible n always permits this.
6. Summary
It has long been established by a non-constructive argument that the modular version of Fermat’s Last Theorem is false. Evidently solutions do exist for any exponent n and all sufficiently large prime moduli
, where
is a threshhold implied by Schur’s Theorem. However, there does not appear at present to be an efficient and transparent method for constructing solutions for small prime moduli. We have furnished this for a large class of compatible exponent/modulus pairs. Moreover, we have outlined directions for application of the method to additional modular Fermat-like equations.