2.1. Characteristics and Conditions for
Theorem 5 from [
17] proves that there exist exactly
different matrices
over
with
and
, that define all
primitive elements of
over
, i.e.,:
where
,
;
is the smallest primitive root in ;
is the index of number by base: , .
In order to simplify computational procedures, this situation justifies the relevance of studying the special case of a primitive element of the form for .
Theorem 5 from the study [
17] includes the following definitions, which we will use in this study.
Definition 1. The power sequence of the matrix is termed as a power chain of length , if for : , where . if .
Definition 2. The period of the matrix is defined as the length of its power chain: .
The order of the matrix as an element of the multiplicative group has the notation .
Consider matrix . Thus .
The characteristic equation of the matrix has the following notation: , or .
The roots of the characteristic equation are the eigenvalues of the matrix . Further, we will abbreviate values through .
In order for a matrix to acquire the maximum number of linearly independent eigenvectors, a sufficient condition is that all roots of its characteristic equation be distinct [
24,
25]. For the matrix
, the necessary and sufficient condition is
.
The study [
17] has demonstrated the following:
For , , the values are in and . The maximum limit of can be reached if and only if the smallest common multiple of the orders is , for example, when at least one of the elements is primitive in ;
For , , the following equality holds:
For the element
of the matrix field
with the order
, the value
(see Formula (25)). According to Theorem 4 in [
17], the maximum limit
is achieved if
while
is a primitive element of the field
with order
.
Remark 1. For the eigenvalues of the matrix , , the equality holds if and only if .
Proof of Remark 1. Let us represent the matrix as , where , , is the diagonalizing matrix for , .
If , then , where .
Now,
. Since the characteristic polynomial of matrix
is irreducible over
, the eigenvalue is
. By Fermat’s theorem [
27], for the elements of
, the following holds:
, i.e.,
. □
Corollary 1. Power if and only if .
Note that the condition of primitiveness in is necessary, even though this condition is not sufficient for ensuring the maximum order of the cyclic subgroup generated by the matrix . The latter is due to the fact that the equality does not exclude cases where for (see Example 1).
Recall that the next expression from [
28] serves to raise a square matrix
to a power, as follows:
where
denotes the trace of the matrix
[
29];
,
.
Also recall that Theorem 1 in [
17] proves that if
,
if and only if
and
On the other hand, Theorem 2 in [
17] states that the following is true for
and
:
If a prime is a Mersenne prime , then ;
- 3.
If , then if and only if
where
.
Example 1. (a) Let us assume that , , , and matrix over .
The value . For , the determinant . Here is not a prime number.
To find , we shall apply Theorem 1 from [17]. By calculating , , we find the values of elements of sequence (6) for by the Formula (7): 0, 1, −1, 6, 0, 8,…. We obtain , , from whence . The characteristic polynomial of the matrix is , it has a discriminant and is irreducible over the field . The decomposition field of is the quadratic extension of the field , in which the eigenvalues of matrix are equal to . Equation (5) for the power yields the following result: , i.e., and .
(b) Let , , , and the matrix over .
The discriminant is . For , the matrix has and . The decomposition field of the characteristic polynomial for the matrix is the simple quadratic extension of the field , where eigenvalues are . The value is a prime number; whereas the determinant . Hence, to determine the period of the matrix , it is impossible to apply Theorem 2 from the study [17] and condition (8). Therefore, Theorem 1 proved in [17] will be applied, having calculated the sequence (6) for with expression (7): 0, 1, 1, 2, 3, 5, 8, 0, 8, …, where , . According to the Equation (5): , whence and .
(c) Let , , , and matrix over .
Discriminant . For , the matrix acquires , and a characteristic polynomial . Since , the extension field of the polynomial will be a quadratic extension of the field . The eigenvalues of the matrix are . To determine , we will calculate values by Equation (6) for according to (8): 0, 1, 2, 2, 0, −4, …, wherein , . This implies that , whence and .
2.2. Selecting Parameters
Let , .
Thus, Considering (4) .
Thus
or
Note that Equation (9) indicates the “periodicity” of the power values of the matrix
in the field
with an accuracy of up to a defined coefficient from
.
Here we consider in more detail the issue of selecting parameters for the matrix with , to achieve maximum for the order of the generated cyclic subgroup.
Recall that according to Theorem 4 in [
17], it is necessary for
to be primitive in
with order
to ensure the maximum value of
for
. For the smallest primitive root
in
, that implies that
, where
. If
, it can be expressed as a power of
:
,
. A primitive
in the equation
,
yields
. This equality is equivalent to the comparison
, where
. For
, the specified comparison has no solutions, in particular for
. Therefore, a necessary condition for primitiveness is the requirement:
where
,
.
In this study, we shall confine ourselves to considering the base case for prime
, when
As is evident from the above,
is a necessary condition. However, this condition cannot be considered sufficient.
It follows from that . Therefore, for an arbitrary quadratic non-residue in the equalities or hold.
Substituting the final expression into
yields
or
. Thus, the final expression reduces the problem of selecting the matrix field parameters to finding a quadratic non-residue
in
, which defines the difference
or
for a given a fixed quadratic non-residue
in
.
Remark 2. For the simplest case, when or , the following equalities hold for the values of the Legendre symbol (see [30]): Therefore, the pair
constitutes quadratic non-residues in
only for
, since for
, the value
is always a quadratic residue for a given quadratic non-residue
[
30]. The matrix
for
has a notation
without variable parameters. In this case
, while
. The multiplicative group has a simple structure
and order
.
Further, we consider the case where .
The solution for the Equation (12) reduces to a search for quadratic non-residues in that satisfy the equality for a given fixed quadratic non-residue in . Here we determine the number of such pairs and that exist.
To solve the problem of finding quadratic non-residues
such that
, we first consider the problem of finding quadratic residues
such that
. The latter expression can be rewritten in the field
as follows:
Here we consider the following cases:
;
;
.
Case 1. If , then or
The number of pairs : , that are the solution of Equation (14) for an arbitrary , equals . The number of distinct pairs with precision up to their permutation is equal to .
The number of distinct pairs : , with precision up to their permutation for a given is equal to the number of quadratic residues in , including zero residue: .
Case 2. If then , where . Since , .
Let us assume that
. Then
or
According to Corollary 3 from Chapter 5 of §1 [
30], Equation (15) has a solution for prime
if and only if
.
We shall accept that is the solution to Equation (15), i.e., , . Therefore, for every : , which implies that the set of pairs defines all possible solutions in the field of the equation , . In addition, since , or .
For , always holds.
Therefore, the number of pairs : , that are the solution to Equation (14) for , equals for , and zero for , whereas the number of distinct pairs with precision up to their permutation for is equal to .
Corollary 2. The number of distinct pairs : with precision up to their permutation that are the solution to Equation (14) for , equals for and zero for .
It is important to notice that the system of nonzero quadratic residues in , , possesses the property of symmetric distribution within the ordered set of residues modulo : , (see Equation (13)).
Corollary 3. The number of nonzero quadratic residues in for a fixed nonzero quadratic residue , which satisfy the condition , is equal to one for and zero for .
Remark 2 states that quadratic non-residues possess a similar symmetry property in , : for every quadratic non-residue there is a quadratic non-residue , such that , i.e., .
Corollary 4. The number of quadratic residues in for a fixed quadratic residue to satisfy the condition is equal to one for and zero for .
Example 2. Let , . Therefore, . Thus, the following values of pairs are obtained for : , , , , , , , , , , , and .
The number of pairs is equal to . The number of distinct pairs up to their permutation will be : , , , , , , , , , , , and .
The number of distinct pairs up to their permutation constitutes : , , and .
Case 3. If , the expression is equivalent to the expression . Substitution , results in the following system: It is widely known ([
30], Chapter 8 of §3) that the number
of solutions of the equation
over
is expressed in terms of Jacobi sums and is equal to
We are interested in the ‘location’ of solutions of the equation
in the multiplicative group
.
To solve system (16), we shall apply a known method for finding Pythagorean triples in
, which deploys Riemann stereographic projection [
31,
32,
33].
Consider the “line” and map the parameter on each pair of solutions over .
If a pair
is the solution to the system (16) then
. There is a unique value of the
parameter, for which the point
lies on the “line”
and which constitutes
At the same time, the following statement holds for any given value of
:
Since
, then
and
, where
,
,
.
Remark 3. The sets and .
Therefore, if the pair of numbers
is the solution to the system (16), then
is always true and there exist
,
, such that
. By substituting the values
into the equation
, we obtain
. Multiplying the latter equation by
, we rewrite Equations (15) and (16) in
for
as one equation, as follows:
Remark 4. Let and be quadratic residues in . In this case, the Equation (14) for takes the following notation: .
Corollary 5. Since Equations (14) and (18) are equivalent for and , equation , where and denotes quadratic residues in , , is only feasible if and , where .
Next, consider function for , . It is evident that in , the roots of this function are represented by solutions to the equation , i.e., , whereas there exist no roots in .
Remark 5. Function for , , acquires each of its values in precisely 4 times. The function acquires the value in twice for , and never for .
Proof of Remark 5. Let . Now, it is necessary to find all , for which . It follows from the latter expression that .
The solution to the latter equation is the set or
Thus, for the arguments , the function repeats its values: . For the remaining argument values : .
Let us now consider the question of the number of distinct elements of the set in .
Since : the solution requires to solve the system or .
The final equation in
has solutions only for
[
30] (see Case 2 for
). Let the solutions have the notation
. From the foregoing, it is evident that
. □
Example 3. Consider the distribution of function values for , , and , by performing a direct calculation of . Table 1 and Table 2 present the results. The results provide an illustration for Remark 5:
The function acquires each its value in precisely 4 times for ;
The function acquires the value in twice for , and never for .
Remark 6. The number of distinct values of the function for , , is equal to the number , where is the floor function of .
Proof of Remark 6. Let be a number of distinct values of the function for . Then, by Remark 5, the upper bound estimation for the number of distinct values of the argument of the function , , is or
We shall denote elements from by , , for which the values are .
Since is the number of distinct values of for , .
It follows that and the number of distinct values of the function , , constitutes whereas . □
Corollary 6. Out of nonzero quadratic residues in , , precisely residues can be presented as , . Note that .
Corollary 7. Let alternately take on the values of all nonzero quadratic residues in , . Then, the sum is a nonzero quadratic residue exactly times for and times for . The sum is a quadratic non-residue exactly times for and times for .
To prove Corollary 7, it is sufficient to apply Equation (18) and Corollaries 5 and 6, taking into account that the sum becomes zero when or . While proving Remark 5, it was shown that has solutions only for , and . Hence, decreases by 1 times the number of nonzero quadratic residues , which form a nonzero quadratic residue by the sum .
Based on the solved cases for Equation (14), we formulate the theorem.
Theorem 1. The following holds true:
Let be a nonzero quadratic residue in , and let take on all nonzero quadratic residues in . Then the sum is a quadratic residue exactly times and is a quadratic non-residue times for a prime and times for a prime .
Let be a quadratic non-residue in , and let take on all quadratic residues in . Then the sum is a quadratic residue exactly times and is a quadratic non-residue times for a prime and times for a prime .
Proof of Theorem 1. In clause 1 of the theorem, consider cases and separately.
For , the value .
For , the value . Then and
Thus, the value acquires the following:
A quadratic residue—zero times, ;
A quadratic non-residue—one time, .
The value for . For , .
The value of the sum for a fixed is once a quadratic residue and once a quadratic non-residue, i.e., .
Now consider the case of prime in clause 1 of the theorem.
Let , be sets of quadratic residues and non-residues in , respectively. We shall operate with the notation of Corollary 7: , , . For arbitrary , , the sets are , , while . Thus, . Let residues take the values of all nonzero quadratic residues in for a given quadratic residue in the equality . Therefore, clause 1 of Theorem 1 follows from Corollary 7 and Corollary 3.
In clause 2, we shall first consider cases for and .
For the value and . Consequently, and .
The value of the sum acquires the following:
A quadratic residue—one time, ;
A quadratic non-residue—zero times, .
For , the value . The values and for a fixed acquire the following:
A quadratic residue—two times, ;
A quadratic non-residue—zero times, .
Next, we consider the case with prime in clause 2.
Now, let acquire those nonzero values of quadratic residues in , for which the sum is a quadratic non-residue according to Corollary 7.
For an arbitrary quadratic non-residue , the following equality holds: .
From the multiplicative property of the Legendre symbol, the sets
and
(see Corollary 2, Chapter 5, §1 [
30]).
Let a fixed quadratic non-residue be given, and let the quadratic non-residue take all values from the set .
According to Corollary 7, for a prime , the sum results in a quadratic non-residue exactly times, while for , it occurs times. Consequently, the sum for a prime yields a quadratic residue exactly times, and for , it occurs times. Taking into account Corollary 4 regarding the symmetry property of the distribution of quadratic residues and non-residues in an ordered set of residues modulo a prime , we deduce that the value is also a quadratic non-residue for a given quadratic non-residue . Thus, the following statement holds: the sum of a quadratic non-residue with all possible quadratic non-residues in results in a quadratic residue exactly times.
To complete the proof of the second clause of the theorem, recall that for in , there exist quadratic non-residues , while for , the number of such values is . As demonstrated above, for a fixed non-residue , the sum is a residue exactly times in . Therefore, the sum is a quadratic non-residue times for and times for .
Theorem 1 is proven. □
Theorem 2. Let be a nonzero quadratic residue (non-residue), and acquires all possible quadratic non-residues (nonzero residues) in . Therefore, the sum is
Proof of Theorem 2. First, consider cases where and .
For , the value , quadratic residue is , and quadratic non-residue is . Thus, results in a quadratic residue once , and in a quadratic non-residue zero times, .
For , the value , quadratic residues , and quadratic non-residues . The value for a fixed is a quadratic residue once and a quadratic non-residue once, i.e., .
Now we consider a case of prime .
Let and . The possible values of the sum form a set .
Let the prime .
If is a quadratic residue, has quadratic residues and quadratic non-residues.
According to clause 1 of Theorem 1, for quadratic residues , the value of becomes a quadratic residue exactly times and a quadratic non-residue times. In accordance with Corollary 4, for quadratic non-residues . Therefore, by Dirichlet’s principle, the value of in the set for quadratic non-residues becomes a quadratic residue exactly times and a quadratic non-residue times.
If is a quadratic non-residue, then in , there exist quadratic residues and quadratic non-residues.
According to clause 2 of Theorem 1, for quadratic non-residues , the value becomes a quadratic residue exactly times and a quadratic non-residue times. Thus, summing a quadratic non-residue sequentially with quadratic residues , the sum will be a quadratic residue times and a quadratic non-residue times.
Now, consider the case when the prime .
If is a quadratic residue, then in , there are equal numbers of quadratic residues and non-residues, both being .
According to clause 1 of Theorem 1, the sum for quadratic residues becomes a quadratic residue times and a quadratic non-residue times. Consequently, for quadratic non-residues , the sum is a quadratic residue times and a quadratic non-residue times.
If is a quadratic non-residue, then in , there are exactly quadratic residues and non-residues. According to clause 2 of Theorem 1, the sum for quadratic non-residues is a quadratic residue times and a quadratic non-residue times. Consequently, for quadratic residues , the sum becomes a quadratic residue times and a quadratic non-residue times.
Thus, Theorem 2 is proven. □
To summarize Theorems 1 and 2,
Table 3 and
Table 4 will demonstrate how the numbers of quadratic residues and non-residues are distributed for the sums
,
, and
, when the first term is fixed (it is denoted by lowercase letters), and the second term acquires all possible values from the definition set, for prime
and
.
Table 3 and
Table 4 are some analogues of Formula (17). According to the proof of Theorem 1 and 2 using relation (18), a regularity is established for the sum of two nonzero elements from
, which can be either quadratic residue or non-residue.
Here, consider examples for and .
Example 4. Let us construct possible combinations , , and , and determine the frequency with which values of the sets and occur in these sums.
(a) .
Let .
For , nonzero quadratic residues are . Accordingly, quadratic non-residues are .
The possible sums , , and will be summarized in Table 5, Table 6 and Table 7. Grey shading in Table 5, Table 6 and Table 7 highlights the cases when the sum is a quadratic residue in . The obtained result corroborates Theorems 1 and 2 as follows:
Each row (column) of Table 5 contains exactly quadratic residues and quadratic non-residues. Each row (column) of Table 6 contains exactly quadratic residues and quadratic non-residues. Each row (column) of Table 7 contains exactly quadratic residues and quadratic non-residues. (b) . Let .
For , nonzero quadratic residues are . Accordingly, quadratic non-residues are .
The possible sums , , and will be totaled up in Table 8, Table 9 and Table 10. The obtained result also illustrates Theorems 1 and 2:
Each row (column) of Table 8 contains exactly quadratic residues and quadratic non-residues. Each row (column) of Table 9 contains exactly quadratic residues and quadratic non-residues. Each row (column) of Table 10 contains exactly quadratic residues and quadratic non-residues. Remark 7. Matrix acquires maximum order if and only if is a primitive element in .
Proof of Remark 7. From relation (4), acquires maximum value if and only if is primitive in with order .
Note that . Since , we obtain . Considering expression (12) , the value . □
The previous example proves that Remark 7 is correct.
Remark 8. Since the mapping is a transformation of the set : , the value of for the maximum order is computed by multiplying the primitive elements by 4.
Remark 9. The order is determined by the pair of values for arbitrary , , and : .
Proof of Remark 9. The characteristic equation of matrix has the form . Since, according to (12), and , the characteristic equation can be rewritten as . Thus, the eigenvalues of matrix depend solely on the values of and .
Given that values determine the eigenvalues of matrix , as well as the value of , the selection of does not affect . □