On the Eight Levels theorem and applications towards Lucas-Lehmer primality test for Mersenne primes, I

Abstract Lucas-Lehmer test is the current standard algorithm used for testing the primality of Mersenne numbers, but it may have limitations in terms of its efficiency and accuracy. Developing new algorithms or improving upon existing ones could potentially improve the search for Mersenne primes and the understanding of the distribution of Mersenne primes and composites. The development of new versions of the primality test for Mersenne numbers could help to speed up the search for new Mersenne primes by improving the efficiency of the algorithm. This could potentially lead to the discovery of new Mersenne primes that were previously beyond the reach of current computational resources. The current paper proves what the author called the Eight Levels Theorem and then highlights and proves three new different versions for Lucas-Lehmer primality test for Mersenne primes and also gives a new criterion for Mersenne compositeness.


Introduction
Primes of special form have been of perennial interest [8]. Among these, the primes of the form 2 p − 1 which are called Mersenne prime. It is outstanding in their simplicity.
• Mathematics is kept alive by the appearance of challenging unsolved problems. The current paper gives new expansions related to the following two major open questions in number theory : Are there infinitely many Mersenne primes? Are there infinitely many Mersenne composite? Many mathematicians believe that there are infinitely many Mersenne primes but a proof of this is still one of the major open problems in number theory (see [3,6,8,11,13,14]).
• Mersenne primes have a close connection to perfect numbers, which are numbers that are equal to the sum of their proper divisors. It is known that Euclid and Euler proved that a number N is even perfect number if and only if N = 2 p−1 (2 p − 1) for some prime p, and 2 p − 1 is prime. Euclid proved only that this statement was sufficient. Euler, 2000 years later, proved that all even perfect numbers are of the form 2 p−1 (2 p − 1) where 2 p − 1 is a Mersenne prime (see [6,18]). Thus the theorems of Euclid and Euler characterize all even perfect numbers, reducing their existence to that of Mersenne primes.
• The odd perfect numbers are quite a different story (see [5,16,18]). An odd perfect number is a hypothetical number that is both an odd integer and a perfect number, meaning that it is equal to the sum of its proper divisors. No odd perfect number has been discovered, and it is not known whether any exist. The search for odd perfect numbers has been ongoing for centuries and has involved many of the greatest mathematicians in history. It is still unknown whether there is any odd perfect number.
• There are practical reasons for seeking out bigger and bigger primes. Very big primes are crucial to the most widely used systems for encrypting data such as those that underpin all online banking and shopping. Based on the properties of Mersenne primes, instead of polynomial rings, Aggarwal, Joux, Prakash, and Santha described an elegant public-key encryption (see [1]).
• The discovery of Mersenne primes has been an active area of research for centuries, and the search for larger and more complex prime numbers continues to this day. The discovery of new Mersenne primes is a significant achievement in the field of mathematics, as these numbers have interesting mathematical properties and are very useful in various applications, such as cryptography and computer science. Using the Lucas-Lehmer test, the computation was carried out at the UCLA Computing Facility, it was reported that 2 4253 − 1 and 2 4423 − 1 are primes [9]. Discovering Mersenne primes is a challenging and time-consuming task, and the discovery of new Mersenne primes often represents a significant achievement in the field of mathematics. The Great Internet Mersenne Prime Search (GIMPS), which is a collaborative project aimed at discovering new Mersenne primes, has discovered the largest known prime number 2 82,589,933 − 1, having 24, 862, 048 digits (see [3,7]). The GIMPS project has been instrumental in discovering the majority of the known Mersenne primes, and it continues to search for new ones. GIMPS is a fascinating example of how the power of distributed computing can be used to advance mathematical knowledge and uncover new discoveries. Each new discovery sets a new record for the largest known prime number. Despite its success in discovering large prime numbers, the Great Internet Mersenne Prime Search (GIMPS) has some limitations. It's worth noting that Mersenne primes are rare and become increasingly difficult to find as their size increases. Surprisingly, as of March 2023, only 51 Mersenne primes are known. While 51 Mersenne primes are currently known, it is not known whether there are any more beyond those that have been discovered. The question of whether there are infinitely many Mersenne primes is one of the major unsolved problems in mathematics. Whether the list of known Mersenne primes is finite or infinite is an open question in mathematics, and it remains an area of active research (see [3,7,14]).

Lucas-Lehmer Primality Test
Mersenne primes have some special properties that make them useful in certain types of computations, particularly in the field of cryptography and computing. One of these properties is that they are easy to test for primality using the Lucas-Lehmer primality test. This makes it easier to find large prime numbers, which are important for secure cryptographic systems. The Lucas-Lehmer primality test is a primality test specifically designed for testing the primality of Mersenne numbers (i.e., numbers of the form 2 p − 1). It is a fast and efficient test that can quickly determine whether a given Mersenne number is prime or composite. It is well-known the following theorems (see [3,6,13]): where n := 2 p−1 .

Euclid-Euler-Lucas-Lehmer Association
Perfect numbers have fascinated mathematicians for centuries, and many properties and patterns have been discovered about them. One of the most famous results about perfect numbers is that every even perfect number can be written in the form where 2 p − 1 is a Mersenne prime. Moreover, every Mersenne prime of the form 2 p − 1 gives rise to an even perfect number through this formula. The following theorem tells us that there is a strong association between perfect numbers and Mersenne primes.
Theorem 2. (Euclid-Euler-Lucas-Lehmer) A number N is even perfect number if and only if N = 2 p−1 (2 p − 1) for some prime p, and where n := 2 p−1 .
For example, the first few even perfect numbers are: and the corresponding Mersenne primes are: (4)

Notations
For a natural number n, we define δ(n) = n (mod 2). For an arbitrary real number x, ⌊ x 2 ⌋ is the highest integer less than or equal x 2 . We also need the following notation For simplicity, we sometimes write

The Purpose of the Current Paper
The aim of this paper is to study some arithmetical properties of the coefficients of the expansion for n ≡ 0, 2, 4, 6 (mod 8). Then we study the expansion for n ≡ 1, 3, 5, 7 (mod 8).

Reasons for why the expansions of 5 and 6 are interesting
We show in the current paper that the numbers of the form arise up naturally in the coefficients of the expansions (5), (6), and enjoy some unexpected new interesting arithmetical properties which could be helpful in the study of Mersenne primes and Mersenne composites.

New Results
We state and prove the following new results in order: We end the paper with a discussion about further potential investigations of how this new versions for Lucas-Lehmer primality test may provide a better theoretical understanding of the two major questions about Mersenne numbers; whether there are infinitely many Mersenne primes or Mersenne composites.

Summary for the Main New Results of the Paper
This paper proves the following new theorems.

The First New Version for Lucas-Lehmer Primality Test
The following result proposes a new double-indexed recurrence relation for the Lucas-Lehmer test.
where n := 2 p−1 , φ k (n) are defined by the double index recurrence relation and the initial boundary values satisfy

The Second New Version for Lucas-Lehmer Primality Test
The following result proposes a new explicit sum of products of difference of squares for the Lucas-Lehmer test.

The Third New Version for Lucas-Lehmer Primality Test
The following result proposes a new nonlinear recurrence relation for the Lucas-Lehmer test.
Theorem 5. Given prime p ≥ 5. The number 2 p − 1 is prime if and only if where n := 2 p−1 , φ k (n) are generated by the double index recurrence relation and we can choose either of the following initial values to generate φ k (n) from the starting term φ 0 (n) or the last term φ ⌊ n 2 ⌋ (n) :

New Version for Euclid-Euler-Lucas-Lehmer Association
Theorem 6. A number N is even perfect number if and only if N = 2 p−1 (2 p − 1) for some prime p, and where n := 2 p−1 .

New Criteria for Compositeness of Mersenne Numbers
3.6 New Combinatorial Identities Theorem 8. (combinatorial identities) For any natural number n, the following combinatorial identities are correct 4 Discussion for the Proposed Method's Theoretical Analysis.

Algebraically independent polynomials
Algebraically independent polynomials are important in several areas of mathematics and its applications, including algebraic geometry, commutative algebra, and number theory.
Algebraic independent polynomials are important because they provide a way to study and understand the relationships between different algebraic objects, such as numbers, functions, and algebraic structures [17]. Two polynomials in two variables, say h(x, y) and g(x, y), are said to be algebraically independent over the field of rational numbers if there exist a polynomial f with rational coefficients such that then this entails that f = 0. The polynomials xy and x 2 + y 2 are algebraically independent over the field of rational numbers. Therefore, if we have the following identity, with integer coefficients µ k (n), then this entails that all the coefficients vanish; which means µ k (n) = 0.

Symmetric Polynomials
Symmetric polynomials are polynomials that remain unchanged under the permutation of their variables. For example, the polynomial x 2 + y 2 + z 2 is symmetric because it remains the same if we swap the variables x, y, and z. For any natural number n, x n + y n is symmetric polynomial. Then we have integer coefficients f k (n), from the fundamental theorem of symmetric polynomials, [17], that satisfy Dividing by (x + y) δ(n) , we get Hence, we get the integer sequence Ψ k (n) that satisfy

The Eight Levels Theorem
Now we prove what we call the Eight Levels Theorem for the expansion of the polynomial in terms of the symmetric polynomials xy and x 2 + y 2 . Then we investigate some properties for the coefficients of the expansion Then we study some applications and prove the results of the summary one by one.

The Statement of the Eight Levels Theorem
Theorem 9. (The Eight Levels Theorem) For any complex numbers x, y, any non negative integers n, k, the coefficients Ψ k (n) of the expansion are integers and and, for each 1 ≤ k ≤ ⌊ n 2 ⌋, the coefficients satisfy the following statements • For n ≡ 0, 2, 4, 6 (mod 8): (20), we immediately get (21). To prove the statements of Theorem (9), we need to prove the following lemmas.
Lemma 11. For every even natural number n, 0 ≤ k ≤ ⌊ n 2 ⌋, the following statements are true for each case: Proof. Consider n even natural number, and replace δ(n) = 0 in (20) to get Then replace x by −x in (26), we get From the algebraic independence of xy, x 2 + y 2 , and from (26), (27) we get the proof.
From (20), we get the following initial values for Ψ k (n).
Lemma 13. For any odd natural number n, the coefficients Ψ k (n) of the expansion of (20) satisfy the following property Proof. For n odd, n + 1 is even. Then from the expansion of (20) we get the following Now acting the differential operator ( ∂ ∂x + ∂ ∂y ) on (29) and noting that and equating the coefficients, we get the proof. (9) for n ≡ 0, 2, 4, 6 (mod 8)
From Theorem (9), we list some examples that show the splendor of the natural factorization of Ψ k (n) for k = 0, 1, 2, 3, 4, 5, 6, 7: , n ≡ 6 (mod 8) and (33) and Ψ 6 (n) = and the following example should give us a better vision about that sequence: . (35) As we see, sometimes the numerator of the sequence Ψ k (n) has a center factor that all the other factors in the numerators get around it. For n ≡ 0, 2, 4, 6 (mod 8), it is symmetric in this sense; meaning if (n − a) is a factor of the numerator then (n + a) would be a factor of that numerator and vice versa. However, it gives a different story for n ≡ 1, 3, 5, 7 (mod 8), and a natural phenomena for these numbers arises up here and needs a closer attention.

The Right Tendency Concept for Ψ k (n)
For n ≡ ±1 (mod 8), from the data above, and from the formulas of Ψ k (n), we can observe that the factors of the numerators for k = 1, 2, 3, 4, 5, 6, · · · always fill the right part first then go around the center factor to fill the left part and so on. For example, for k = 1 the center factor is (n − 1). Then for k = 2, the next factor (n + 3) is located on the right of (n − 1). We call this natural behavior by the right tendency which is explained in table (36).

The Left Tendency Concept for Ψ k (n)
However, for n ≡ ±3 (mod 8), and from the data above, and the formulas of Ψ k (n), we can also observe that the factors of the numerators for k = 1, 2, 3, 4, 5, 6, · · · always fill the left part first then go around the center factor to fill the right part and so on. For example, for k = 1 the center factor is (n + 1). Then for k = 2, the next factor (n − 3) is located on the left of (n + 1). We call this natural behavior by the left tendency which is explained in table (37).

Theorem 14. (Generating The Ψ−integers From The Previous Term)
If Ψ k (n) not identically zero, then and we can choose either of the following initial values to generate Ψ k (n) from the starting term Ψ 0 (n) or the last term Ψ ⌊ n 2 ⌋ (n) : , Ψ ⌊ n 2 ⌋ (n) = 1.

The emergence of φ−sequence
Another natural sequence that emerges naturally from Ψ k (n) is the integer sequence φ k (n) which is defined as follows

Explicit formulas For φ−sequence
Now, from Theorem (9), we get the following explicit formulas for the integer sequence φ k (n).
Lemma 18. For any non negative integers n, k, the sequences φ k (n) satisfy the following statements

Nonlinear recurrence relation to generate φ−sequence
To study the arithmetic properties of φ−Sequence, we need to generate φ k (n) from the previous one, φ k−2 (n), or generate φ k (n) from the next one, φ k+2 (n). As and noting that δ(n) = 0, δ(n − 1) = 1, for n even, we immediately get, from Theorem (14), the following desirable theorem.

The Proof of the Second New Version
From Lemmas (16), (17), we should observe that the recurrence relation of φ k (n) is always even integer for n ≡ 0 (mod 8). Hence from Lemma (18), we get the following theorem.
The author feels that we need a clever way to evaluate the sum (48). We may like to add the terms in a way reflects some elegant arithmetic. Remember that we do not need to compute the sum (48) exactly; but we just need to find the sum modulo 2n − 1. According to the following theorem, and working modulo 2n − 1, the last term always gives the value of the first term.

The 5 scenario
For example, take p = 5, then n = 2 4 . Hence Hence we get the partial sums As we ended up with zero, this shows that 2 5 − 1 = 31 is Mersenne prime.

Further Research Investigations
Now, consider p prime greater than 3, and n := 2 p−1 . The previous sections give various explicit formulas and techniques to compute and generate all of the terms φ k (n) needed for checking the primality of the Mersenne number 2 p − 1.

Searching for a hypothetical pattern
This previous particular example, for p = 5 = 2 2 + 1, is illuminating and should motivate us for further theoretical investigations for other similar scenarios. We need to find a general pattern for n similar to this special case, for p = 5, such that, working modulo 2n − 1, the partial sums gives: where ǫ k ∈ {0, −1, +1} for each k. We need to investigate certain types of prime p. We should try to investigate the primes p of the form 2 a ± 1 or 2 a ± 2 b ± 1 to make the sum ⌊ n 2 ⌋ k=0, k even φ k (n) (mod 2n − 1), easily to understand and help us identify a general pattern for p for which this sum gives zero modulo 2n − 1 infinitely many times (in this case we could prove that Mersenne primes are infinite), or gives nonzero modulo 2n − 1 infinitely many times (in this case we could prove that Mersenne composites are infinite).
13.2 New identities to help understand the sums of (48) and (54) To motivate the readers about this future vital research and investigations, and in the spirit of the previous results, I feel compelled to mention, even though succinctly, the following new identities that I found recently for φ k (n): For any natural number p greater than 3, and n := 2 p−1 , we get the identities ⌊ n 2 ⌋ k=0, k even φ k (n) 2 −k = 2, ⌊ n 2 ⌋ k=0, k even φ k (n) 2 −2k = −1, where L(n) is Lucas sequence defined by L(m+1) = L(m)+L(m−1), L(1) = 1, L(0) = 2.

The Nature of the Prime Factors of the Sum
We use SAGE, [19], with double-checking provided by Mathematica, to carry out all the numerical computations of the current paper. For p = 5, n = 16, the following sum ⌊ n 2 ⌋ k=0, k even φ k (n) = 2 × 31 × 607.
This shows that the number 31 is Mersenne prime because it is one of the factors of this sum. Surprisingly, although the prime number 607 is not a Mersenne prime, the number 607 is the exponent of the Mersenne prime 2 607 − 1. Moreover, the prime 607 is an irregular prime since it divides the numerator of the Bernoulli number B 592 . So, for a given prime p, n := 2 p−1 , we should also investigate the arithmetical nature of all the other prime factors for the sum ⌊ n 2 ⌋ k=0, k even φ k (n).

Conclusions
The discovery of new Mersenne primes is significant in the field of mathematics because they are relatively rare and difficult to find. Moreover, they have important applications in areas such as cryptography, number theory, and computer science. As of April 2023, there are currently only 51 known Mersenne primes. The largest known Mersenne prime as of this date is 2 82,589,933 − 1, which has 24,862,048 digits. The discovery of Mersenne primes is a very challenging, computationally intensive process, and time-consuming task, and the search for new Mersenne primes via GIMPS is an ongoing effort by many mathematicians and computer scientists around the world. While the Great Internet Mersenne Prime Search (GIMPS) has been successful in discovering 51 Mersenne primes to date, there are several limitations to the search. The search for Mersenne primes is a probabilistic process, and it is not guaranteed that a new Mersenne prime will be found. Even if a new Mersenne prime exists, there is a chance that it may not be discovered in a given search due to the limitations of the algorithm or computational resources. The search becomes increasingly difficult as the size of the potential primes increases, and it may become impractical or impossible to search for larger Mersenne primes without significant advances in theoretical understanding of the nature of Mersenne primes. Therefore, the current paper developed three new versions of primality tests for Mersenne numbers which could potentially help in the search for new Mersenne primes or provide insights into the open questions surrounding the infinitude of Mersenne primes or Mersenne composites.

Supplementary information
Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.