Preprint
Article

Global Generalized Mersenne Numbers: Definition, Decomposition, and Generalized Theorems

Altmetrics

Downloads

113

Views

51

Comments

0

A peer-reviewed article of this preprint also exists.

This version is not peer-reviewed

Submitted:

08 February 2024

Posted:

09 February 2024

You are already at the latest version

Alerts
Abstract
A new generalized definition of Mersenne numbers is proposed of the form (a^n - (a-1)^n), called Global Generalized Mersenne numbers, or simply Generalized Mersenne numbers and noted GM_{a,n} where a is the base and n is the exponent, both being positive integers. The properties are investigated for prime exponents n and several theorems on Mersenne numbers regarding their congruence properties are generalized and demonstrated. In particular, it is found that, for any base a, Generalized Mersenne numbers are in general such that (GM_{a,n} - 1) are even and divisible by n, a and (a-1) for any odd prime exponent n and by (a(a-1)+1) for any prime exponent n > 5. The remaining factor is a function of triangular numbers of (a-1), specific to each prime exponent n. Four theorems on Mersenne numbers are generalized and four new theorems are demonstrated, allowing to show first, that (GM_{a,n} - 1) are divisible by 6, and more precisely GM_{a,n} are congruent to 1(mod 12) or 7(mod 12) depending on the congruence of the base a(mod 4); second, that (GM_{a,n} - 1) are divisible by 10 if n == 1(mod 4) and, if n == 3(mod 4), GM_{a,n} == 1(mod 10), or 7(mod 10) or 9(mod 10) depending on the congruence of the base a(mod 5); third, that all factors c_{i} of GM_{a,n} are of the form (2nf_{i}+1) with f_{i} natural integers such that c_{i} is prime itself or the product of primes of the form (2nj+1) with j natural integer; fourth, that for odd prime exponents n, all GM_{a,n} are periodically congruent to either +/-1\(mod 8) or +/-3(mod 8) depending on the congruence of the base a(mod 8); and fifth, that the factors of a composite GM_{a,n} is of the form (2nf_{i}+1) with f_{i} == u(mod 4) and u being either 0, 1, 2 or 3 depending on the congruence of the exponent n(mod 4) and on the congruence of the base a(mod 8). The potential use of Generalized Mersenne primes in cryptography is shortly addressed.
Keywords: 
Subject: Computer Science and Mathematics  -   Algebra and Number Theory

1. Introduction

It is known that if a Mersenne number of the form M n = ( 2 n 1 ) is prime, then n is prime. The reciprocal is not true, as for example for n = 11 , M 11 is composite, M 11 = 2047 = 23 89 (for review, see e.g., [4,23,34]). There are 51 Mersenne prime numbers known [13]. The largest appears for n = 82589933 , M 82589933 = 2 82589933 1 , and has 24862048 digits.
Due to their intensive use in cryptography, several generalizations of Mersenne numbers have been proposed, first by Crandall [8] of the form ( 2 n C ) where C is a small odd natural integer number; then by Solinas [29,30,31] of the form 2 n + ϵ 3 2 m 3 + ϵ 2 2 m 2 + ϵ 1 2 m 1 + ϵ 0 which generalized also Fermat numbers and where ϵ i = 1 , 0 or + 1 , m i and n are multiple of s, the length of a computer word (e.g. s = 32 ); and finally further generalized [10] in the form 2 n + i = 1 k ϵ i 2 m i + ϵ 0 with n, k and m i natural integers, 1 k < n , 1 m i < n and ϵ i = 1 , 0 or + 1 . Hoque and Saikia proposed [16,17] another definition of generalized Mersenne numbers as M p , q = ( p q p + 1 ) where p , q are positive integers. Deng introduced [11] a different definition of generalized Mersenne primes which is of the form R ( k , p ) = ( p k 1 ) / ( p 1 ) , where k , p and R ( k , p ) are prime numbers.
In this paper, we propose another generalized definition of Mersenne numbers of the form a n a 1   n with a and n natural integers. Although the name Generalized Mersenne number is already in use for pseudo-Mersenne numbers of the form proposed by Crandall [8], Solinas [29,30,31], and others, we propose to call them Global Generalized Mersenne numbers, or in short Generalized Mersenne ( G M a , n ) numbers, referring to the fact that both the base a and the exponent n can take any integer values > 1 .
Generalized Mersenne numbers are defined in Section 2.1. Section 2.2 gives several decompositions of G M a , n . Several theorems on congruence of Mersenne numbers are generalized for G M a , n in Section 2.3. Congruence properties of G M a , n and of their factors are investigated in Section 2.4. The density of Mersenne primes and the potential use of Generalized Mersenne primes in cryptography are shortly discussed in Section 3. Conclusions are drawn in Section 4.

2. Materials and Methods

2.1. Generalized Mersenne numbers

Mersenne numbers can be seen as the difference of the n t h power of the first two successive integers
M n = 2 n 1 = 2 n 1 n
By extension, Generalized Mersenne (GM) numbers, noted G M a , n , are defined as the difference of the n t h power of two successive integers
G M a , n = a n a 1   n
and indexed by the base a and the exponent n, with a 2 and n 2 natural integers.
It is easy to show, like for Mersenne numbers, that Generalized Mersenne numbers can only be primes if n itself is prime. Indeed, if n is composite, n = r s with r and s natural positive integers, then all G M a , n = a r s a 1   r s are binomial numbers, having a r a 1   r or a s a 1   s as integer factor. Therefore, in the rest of this paper, we will consider only the cases of n being prime.
Table 1 shows the first 25 G M a , n numbers for the first five primes n = 2 , 3 , 5 , 7 , 11 , with G M a , n prime and composite numbers shown respectively in bold and italic characters.
For n = 2 , (2.2) yields all the odd integers G M a , 2 = 2 a 1 . For n = 3 , the first four G M a , 3 numbers are prime for a = 2 to 5; further numbers are composite or prime without any seemingly regular pattern. For n = 5 and 7 and a = 2 , G M 2 , 5 and G M 2 , 7 are the Mersenne primes M 5 and M 7 . For 3 a 19 , interesting patterns occur in the two G M a , 5 and G M a , 7 series. For a = 3 and 4, G M a , 5 and G M a , 7 are oppositely prime and composite. For a = 5 , G M a , 5 and G M a , 7 are both composites. For a = 6 to 12, G M a , 5 and G M a , 7 are oppositely primes and composites again, with a series of composite G M a , 5 and prime G M a , 7 for a = 7 to 10. For a = 13 to 19, G M a , 5 and G M a , 7 are composites or primes for same values of a. For larger values of a, regular patterns between G M a , 5 and G M a , 7 disappear and reappear for certain ranges of values of a. For n = 11 , the first four G M a , 11 are composite (the fifth Mersenne number M 11 = 2047 is not prime). Among the first 25 G M a , 11 , the values for a = 6 , 8, 10 and 14 yield prime numbers.
It is observed that, for odd values of n with n 1 ( m o d 4 ) , the series of G M a , n numbers generated for successive values of the base a have 1 as last digit, while for odd values of n with n 3 ( m o d 4 ) , the series of the last digit of G M a , n numbers are repetitions of the sequence 1, 7, 9, 7, 1 respectively for bases a k ( m o d 5 ) , with k respectively 1, 2, 3, 4, 0. This is demonstrated further in Section 2.3.3.
The cause of these patterns, or lack of it, in the distributions of composite and prime generalized Mersenne numbers is tantalizing. The beginning of an answer is given in the next sections.
Table 1. First 25 G M a , n numbers for n = 2 , 3, 5, 7, 11.
Table 1. First 25 G M a , n numbers for n = 2 , 3, 5, 7, 11.
a n = 2 n = 3 n = 5 n = 7 n = 11
2 3 7 31 127 2047
3 5 19 211 2059 175099
4 7 37 781 14197 4017157
5 9 61 2101 61741 44633821
6 11 91 4651 201811 313968931
7 13 127 9031 543607 1614529687
8 15 169 15961 1273609 6612607849
9 17 217 26281 2685817 22791125017
10 19 271 40951 5217031 68618940391
11 21 331 61051 9487171 185311670611
12 23 397 87781 16344637 457696700077
13 25 469 122461 26916709 1049152023349
14 27 547 166531 42664987 2257404775627
15 29 631 221551 65445871 4600190689711
16 31 721 289201 97576081 8942430185041
17 33 817 371281 141903217 16679710263217
18 35 919 469711 201881359 29996513771599
19 37 1027 586531 281651707 52221848818987
20 39 1141 723901 386128261 88309741101781
21 41 1261 884101 521088541 145477500542221
22 43 1387 1069531 693269347 234040800869107
23 45 1519 1282711 910467559 368491456502599
24 47 1657 1526281 1181645977 568871385255097
25 49 1801 1803001 1517044201 862504647846601

2.2. Decomposition of Generalized Mersenne Numbers

It is known that all Mersenne numbers and their factors can be written in the form
M n = 2 n q + 1
with q and n positive natural integer and n prime (see e.g. [23,27] and [6]). All Generalized Mersenne numbers can also be written in a similar form as demonstrated in the following theorem.
Theorem 1.
For a and n natural integers, n > 2 , all Generalized Mersenne numbers can be written as
G M a , n = 2 n Q n a + 1
for all prime exponents n > 2 and for all bases a, and where Q n a is a polynomial in a of degree n 1 .
Proof. 
Let a, n, i and j be natural integers, with n prime, n > 2 and i < n . Posing
d i n = C i n n = n 1 ! i ! n i !
with C i n the binomial coefficient, writing Δ for convenience for the triangular number of a 1 , = a 1 = a a 1 2 , and noting that the exponent n is odd, developing the polynomial (2.2) yields
G M a , n = a n a n + i = 1 n 1 1 i C i n a n i 1 = i = 1 n 1 1 i + 1 C i n a n i + 1 = n i = 1 n 1 1 i + 1 d i n a n i + 1 = n i = 1 n 1 2 1 i + 1 d i n a n i a i + 1 = n i = 1 n 1 2 1 i + 1 d i n a i a n 2 i 1 + 1 = n i = 1 n 1 2 1 i + 1 d i n a i a 1 j = 0 n 1 2 i a n 1 2 i j + 1 = n a a 1 i = 1 n 1 2 1 i + 1 d i n j = 0 n 1 2 i a n 2 i j + 1 = 2 n i = 1 n 2 S i 1 a n 2 i + 1
where, for 1 i n 1 2 ,
S i 1 = j = 1 i 1 j + 1 d j n
and for n + 1 2 i n 2 ,
S i 1 = j = i + 1 n 1 1 j d j n = S n 1 i 1
Relation (2.6) shows that the form (2.4) is obtained where the positive integer function Q n a is only function of the variable a and is a polynomial in a of degree n 1 . □
One can characterize further the integer function Q n a for higher values of n as follows.
Theorem 2.
For a and n natural integers, n > 2 , all Generalized Mersenne numbers can be written as
G M a , n = 2 n Q n 2 + 1
for all prime exponents n 3 , and as
G M a , n = 2 n 2 + 1 Q " n 2 + 1
for all prime exponents n 5 and for all bases a, where Q n 2 and Q " n ( 2 Δ ) are polynomials in the variable a 1 only, the triangular number of a 1 , and of degrees n 3 2 and n 5 2 respectively.
Proof. 
Let a, n, i, j, J, k and K be natural integers, with n prime, n > 2 and i < n . Continuing from (2.6) the development of the polynomial (2.2) in n 1 2 successive iterations, one obtains an expression of G M a , n of the form of either (i) n 1 2 embedded products in the new variable = a 1 or (ii) a polynomial of degree n 1 2 in ▵.
(i) By arranging similarly the terms a n 2 i in successive differences, a second iteration yields from (2.6)
G M a , n = 2 n i = 1 n 4 S i 2 a n 2 i a n 3 i + S n 2 1 + 1 = 2 n i = 1 n 4 S i 2 a n 3 i a 1 + S n 2 1 + 1 = 2 n 2 i = 1 n 4 S i 2 a n 4 i + 1 + 1
where
S i 2 = j = 1 i S j 1 , S n 2 1 = S 1 1 = 1
Repeating the process of rearranging the terms a n 4 i , the third iteration yields from (2.11)
G M a , n = 2 n 2 2 i = 1 n 6 S i 3 a n 6 i + S n 4 2 + 1 + 1
where
S i 3 = j = 1 i S j 2 , S n 4 2 = n 3 2
that can be easily demonstrated from the equality for odd n
i = 0 n 1 2 1 i C i n = 2 i = 0 n 1 2 1 i i d i n
Further iterations yield successively from (2.13)
4th iteration:
G M a , n = 2 n 2 2 2 i = 1 n 8 S i 4 a n 8 i + S n 6 3 + S n 4 2 + 1 + 1
..., k t h iteration (for k 3 ):
G M a , n = 2 n 2 2 2 . . . 2 i = 1 n 2 k S i k a n 2 k i
+ S n 2 k 1 k 1 . . . + S n 6 3 + S n 4 2 + 1 + 1
where
S i 4 = j = 1 i S j 3 , S i k = j = 1 i S j k 1
The iteration process stops after n 1 2 iterations yielding finally the n 1 2 embedded products
G M a , n = 2 n 2 2 2 . . . 2 + S 3 n 3 2 . . . + S n 6 3 + S n 4 2 + 1 + 1
The independent terms are
S n 2 k k = j = 1 n 2 k 1 j + 1 i = 0 k 2 n 2 k + 1 j + i k 1 ! d j n = j = 1 n 2 k 1 j + 1 C n 2 k j n k + 1 j d j n
that can be transformed by a change of index J = n 2 k j in
S n 2 k k = J = 0 n 2 k 1 1 n 2 k + 1 J C J k 1 + J C n 2 k J n n = 1 n J = 0 n 2 k 1 J C J k 1 + J C n 2 k J n + C n 2 k n k 1 = 1 n J = 0 n 2 k C J k C n 2 k J n + C n 2 k n k 1 = C n 2 k n k + C n 2 k n k 1 n = C k 1 n k 1 k = n k + 1 ! k ! n 2 k !
and where Vandermonde’s convolution was used, yielding S n 2 1 = 1 , S n 4 2 = n 3 2 ! , S n 6 3 = n 4 n 5 3 ! , S n 8 4 = n 5 n 6 n 7 4 ! , ... The last independent term (the one in the middle of (2.19)) is found for k = n 3 2 , yielding
S 3 n 3 2 = C n 5 2 n + 1 2 n 3 2 = n 2 1 24 = n 2 1 2 2 × 3 !
The independent terms before the last one can also be written as
S 5 n 5 2 = n 2 1 n 2 3 2 2 4 × 5 ! , S 7 n 7 2 = n 2 1 n 2 3 2 n 2 5 2 2 6 × 7 ! , . . .
or more generally for K = 3 to n 2
S K n K 2 = i = 1 K 1 2 n 2 2 i 1 2 2 K 1 × K !
(ii) Instead of embedded products, a polynomial expression can be found from (2.19) in the form
G M a , n = 2 n i = 0 n 3 2 2 i S n 2 i + 1 i + 1 + 1 = 2 n i = 0 n 3 2 2 i C i n i 2 i + 1 + 1
The positive integer function Q n a in (2.4) can be deduced as a function of Δ either from (2.19)
Q n a = 2 2 2 . . . 2 + S 3 n 3 2 . . . + S n 6 3 + S n 4 2 + 1
or from (2.25)
Q n a = i = 0 n 3 2 2 i S n 2 i + 1 i + 1
The positive integer function Q n 2 in (2.9) can be deduced from (2.26) or (2.27) with (2.21)
Q n 2 = k = 1 n 1 2 2 k 1 S n 2 k k = k = 1 n 1 2 2 k 1 C k 1 n k 1 k
For n 5 , factoring the right side of (2.25) by 2 + 1 yields
G M a , n = 2 n 2 + 1 i = 0 n 5 2 2 i j = 0 n 5 2 i 1 n 5 2 i + j S 2 j + 1 n 1 2 j + 1 = 2 n 2 + 1 i = 0 n 5 2 2 i j = 0 n 5 2 i 1 n 5 2 i + j C 2 j n 1 2 + j 2 j + 1 + 1
The positive integer function Q " n 2 in (2.10) is deduced further from (2.29)
Q " n 2 = i = 0 n 5 2 2 i j = 0 n 5 2 i 1 n 5 2 i + j S 2 j + 1 n 1 2 j
or inversely, by inverting the sums,
Q " n 2 = 1 n 5 2 j = 0 n 5 2 1 j C 2 j n 1 2 + j 2 j + 1 i = 0 n 5 2 j 2 i
Therefore, the general form of all G M a , n can be written as in (2.9) and (2.10) for n prime, respectively n 3 and n 5 , where the positive integer functions Q n 2 and Q " n 2 are polynomials of only the triangular number a 1 as variable and of degrees respectively n 3 2 and n 5 2 . □
Note that for large values of the exponent n, the calculation of G M a , n becomes quickly intractable as n t h powers become difficult to compute. The development given in Theorem 2 for odd prime values of n alleviates the problem by reducing the degree of the polynomial (2.2) from n to n 1 2 .
For very large values of a and n, the value of a G M a , n is dominated by the first term in the polynomial (2.25) and can therefore be approximated by
G M a , n n a n 1
for a 1 and n prime 1 , the approximation growing better for increasingly larger values of a and n.
For the first six odd prime values of the exponent n, the form (2.19) of embedded products for G M a , n yields
G M a , 3 = 2 × 3 + 1
G M a , 5 = 2 × 5 2 + 1 + 1
G M a , 7 = 2 × 7 2 2 + 2 + 1 + 1
G M a , 11 = 2 × 11 2 2 2 2 + 5 + 7 + 4 + 1 + 1
G M a , 13 = 2 × 13 2 2 2 2 2 + 7 + 14 + 12 + 5 + 1 + 1
G M a , 17 = 2 × 17 2 2 2 2 2 2 2 + 12 + 42 + 66 + 55
+ 26 + 7 + 1 + 1
while the polynomial expression (2.29) gives, with further factorization,
G M a , 7 = 2 × 7 2 + 1 2 + 1
G M a , 11 = 2 × 11 2 + 1 2 2 + 1 2 + 3 + 1 + 1
G M a , 13 = 2 × 13 2 + 1 2 2 + 1 2 + 1 2 + 3 4 + 2 + 1
G M a , 17 = 2 × 17 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1
2 + 1 2 + 6 9 + 1 + 6 4 + 1 + 1
etc, where, to recall, ▵ is written for a 1 and where several factorizations are possible for n 13 . As a further example, Tables 2 show the first ten values of G M a , n for prime exponents n from 3 to 11, with the decomposition (2.33), (2.34), (2.39) and (2.40) in integer factors of G M a , n 1 .
Table 2. Decomposition of Generalized Mersenne numbers G M a , n for 2 a 10 .
Table 2. Decomposition of Generalized Mersenne numbers G M a , n for 2 a 10 .
GM a , 3 = 2 3 + 1 Decomposition of GM a , 3 1
7 = 2 3 1 + 1 prime
19 = 2 3 3 + 1 prime
37 = 2 3 6 + 1 prime
61 = 2 3 10 + 1 prime
91 = 2 3 15 + 1 = 7 13 = 2 3 + 1 2 2 3 + 1
127 = 2 3 21 + 1 prime
169 = 2 3 28 + 1 = 13 2 = 2 2 3 + 1 2
217 = 2 3 36 + 1 = 7 31 = 2 3 + 1 2 3 5 + 1
271 = 2 3 45 + 1 prime
GM a , 5 = 2 5 2 + 1 + 1 Decomposition of  GM a , 5 1
31 = 2 5 1 3 + 1 prime
211 = 2 5 3 7 + 1 prime
781 = 2 5 6 13 + 1 = 11 71 = 2 5 + 1 2 5 7 + 1
2101 = 2 5 10 21 + 1 = 11 191 = 2 5 + 1 2 5 19 + 1
4651 = 2 5 15 31 + 1 prime
9031 = 2 5 21 43 + 1 = 11 821 = 2 5 + 1 2 2 5 41 + 1
15961 = 2 5 28 57 + 1 = 11 1451 = 2 5 + 1 2 5 2 29 + 1
26281 = 2 5 36 73 + 1 = 41 641 = 2 3 5 + 1 2 7 5 + 1
40951 = 2 5 45 91 + 1 = 31 1321 = 2 5 3 + 1 2 3 5 3 11 + 1
GM a , 7 = 2 7 2 + 1 2 + 1 Decomposition of  GM a , 7 1
127 = 2 7 1 3 2 + 1 prime
2059 = 2 7 3 7 2 + 1 = 29 71 = 2 2 7 + 1 2 7 5 + 1
14197 = 2 7 6 13 2 + 1 prime
61741 = 2 7 10 21 2 + 1 = 29 2129 = 2 2 7 + 1 2 4 7 19 + 1
201811 = 2 7 15 31 2 + 1 = 29 6959 = 2 2 7 + 1 2 7 2 71 + 1
543607 = 2 7 21 43 2 + 1 prime
1273609 = 2 7 28 57 2 + 1 prime
2685817 = 2 7 36 73 2 + 1 prime
5217031 = 2 7 45 91 2 + 1 prime
GM a , 11 = 2 11 2 + 1 2 2 + 1 2 + 3 + 1 + 1 Decomposition of  GM a , 11 1
2047 = 2 11 1 3 2 1 3 5 + 1 + 1 = 23 89 = 2 11 + 1 2 3 11 + 1
175099 = 2 11 3 7 2 3 7 9 + 1 + 1 = 23 2 331 = 2 11 + 1 2 2 11 3 5 + 1
4017157 = 2 11 6 13 2 6 13 15 + 1 + 1 = 23 174659 = 2 11 + 1 2 11 17 467 + 1
44633821 = 2 11 10 21 2 10 21 23 + 1 + 1 = 6359 7019 = ( 2 11 17 2 + 1 ) ( 2 11 2 29 + 1 )
313968931 = 2 11 15 31 2 15 31 33 + 1 + 1 prime
1614529687 = 2 11 21 43 2 21 43 45 + 1 + 1 = 89 18140783 = ( 2 3 11 + 1 ) ( 2 11 19 43399 + 1 )
6612607849 = 2 11 28 57 2 28 57 59 + 1 + 1 prime
22791125017 = 2 11 36 73 2 36 73 75 + 1 + 1 = 23 990918479 = ( 2 11 + 1 ) ( 2 11 45041749 + 1 )
68618940391 = 2 11 45 91 2 45 91 93 + 1 + 1 prime

2.3. Congruence Properties of Generalized Mersenne Numbers

2.3.1. Corollary on Congruence of Generalized Mersenne Numbers

We start first with a corollary of Theorem 2.
Corollary 3.
For all natural integer bases a 2 , all Generalized Mersenne numbers are such that
G M a , n 1 mod n
G M a , n 1 mod a
G M a , n 1 mod a 1
for all natural integer prime exponents n 3 and
G M a , n 1 mod a a 1 + 1
G M a , n 1 mod a a 1 a 2 a + 1
for all natural integer prime exponents n 5 .
Proof. 
Let a and n be natural integers with a 2 and n prime, n 3 . Relation (2.43) holds obviously from (2.9) or from (2.2) by Fermat’s little theorem. More precisely, all G M a , n are such that
G M a , n 1 mod 2 n
Relations (2.44) and (2.45) are also deduced directly from (2.9) and (2.46) and (2.47) are deduced from (2.10). □
Note that for n = 2 , G M a , 2 ± 1 mod 4 obviously as G M a , 2 are all odd natural integers.

2.3.2. Generalization of a First Theorem on Congruence of Mersenne Numbers

Several theorems are known on the congruence of Mersenne numbers and their factors (see e.g. [23] and [27]). These can easily be extended to Generalized Mersenne numbers.
With notations of this paper, a first theorem on Mersenne numbers states that if n is odd, n 3 , then M n 7 ( mod 12 ) . This theorem is generalized as follows
Theorem 4.
For all natural integer bases a 2 , and for all natural integer prime exponents n 3 , all Generalized Mersenne numbers are such that
G M a , n 1 ( mod 6 )
and more precisely,
G M a , n 1 ( mod 12 ) i f a 0 ( mod 4 ) o r 1 ( mod 4 )
G M a , n 7 ( mod 12 ) i f a 2 ( mod 4 ) o r 3 ( mod 4 )
Proof. 
Let a, n, m be natural integers with a 2 and n prime, n 3 . Noting first from (2.9) and (2.48) that one can write in all generality
G M a , n 2 n m Q n a + 1 mod m 2 n Q n a + 1 mod m
(2.49) is easily demonstrated for m = 6 . For n = 3 , (2.52) reduces directly to (2.49). For n 5 , replacing Q n a in (2.52) by (2.10) yields
G M a , n 2 n Q n a + 1 mod 6 2 n 2 + 1 Q " n 2 + 1 mod 6
As a 1 is a multiple of 3 if a 0 mod 3 or 1 mod 3 and 2 a 1 + 1 is a multiple of 3 if a 2 mod 3 , (2.49) holds for all values of bases a and for all odd prime exponents n.
Relations (2.50) and (2.51) are demonstrated similarly for m = 12 in (2.52). □

2.3.3. Theorem on congruence of Generalized Mersenne numbers

A new theorem on Generalized Mersenne numbers is proposed as follows.
Theorem 5.
For all natural integer bases a 2 , and for natural integer prime exponents n 3 , all Generalized Mersenne numbers are such that, if n 1 mod 4 ,
G M a , n 1 mod 10
and, if n 3 mod 4 ,
G M a , n 1 mod 10 i f a 0 mod 5 o r 1 mod 5
G M a , n 7 m o d 10 i f a 2 mod 5 o r 4 mod 5
G M a , n 9 m o d 10 i f a 3 mod 5
Proof. 
Let a, i, k, n, m, r be natural integers with a 2 and n prime, n 3 , and let α be an integer and ▵ is written for a 1 for convenience.
(i) For the first case n = 4 r + 1 , (2.54) is immediate for n = 5 by (2.9).
For n > 5 , we have to show that Q n a 0 mod 5 or Q n 2 0 mod 5 . If a 0 mod 5 or 1 mod 5 , then a 1 0 mod 5 and (2.54) is proven by (2.10) for these two cases.
For a 3 mod 5 , one has 2 a 1 1 mod 5 and (2.28) yields
Q n 2 k = 1 n 1 2 C k 1 n k 1 k mod 5
Hensley established [14] a computer assisted proof, based on the Zeilberger algorithm, and confirmed by a Maple computation, showing that
k = 1 m α k 1 C k 1 2 m k k = 1 α 2 m + 1 1 + 2 m + 1 1 + 2 α 1 + 4 α m 1 + 4 α 1 + 4 α 1 + 4 α 1 + 2 α + 1 + 4 α m 1 + 4 α + 1 + 4 α 1 + 4 α
For m = n 1 2 and α = 1 , (2.59) simplifies into
k = 1 n 1 2 C k 1 n k 1 k = 1 n 1 + 2 n + 1 2 3 5 n 1 2 5 5 5 3 + 5 n 1 2 5 + 5 5 = 1 + 5 2 n + 1 5 2 n 1 n = L n 1 n
where the definition of Lucas numbers L n in function of the golden ratio was used (see relations (62) in [33] and (70) in [12]). This expression (2.60) is always 0 mod 5 for n prime of the form n = 4 r + 1 , as
L n 1 n = L 4 r + 1 L 1 4 r + 1 = 5 F 2 r F 2 r + 1 4 r + 1 = 5 i = 1 2 r F i 2 4 r + 1
where transformations of Lucas numbers L n into Fibonacci numbers F i were used (see relations (17b) and (45) in [33], (5) and (23) in [12], (13) and (14) in [2], (77) in [15], identity 9 in [20], and [21]). Furthermore, it was shown [22,26] that the product of two consecutive Fibonacci numbers F 2 r F 2 r + 1 for n = 4 r + 1 prime > 5 is divisible by n. Therefore, Q n 2 0 mod 5 in (2.58) and (2.54) holds for a 3 mod 5 .
For a 2 mod 5 and a 4 mod 5 , one has 2 a 1 2 mod 5 and (2.28) yields
Q n 2 k = 1 n 1 2 2 k 1 C k 1 n k 1 k mod 5
For m = n 1 2 and α = 2 , (2.59) simplifies directly into
k = 1 n 1 2 2 k 1 C k 1 n k 1 k = 2 n 1 1 n
which is always congruent to 0 modulo 5 for n prime of the form n = 4 r + 1 . Indeed, one has ( 2 4 r 1 ) = ( 16 r 1 ) , and as 16 r 6 mod 10 , then ( 2 4 r 1 ) 5 mod 10 , meaning that ( 2 n 1 1 ) is a multiple of 5. Furthermore, by Fermat’s theorem, ( 2 n 1 1 ) is always divisible by n if n is prime. Therefore 2 n 1 1 n 0 mod 5 and relation (2.62) holds for n prime of the form n = 4 r + 1 . The theorem first part (2.54) is then proven for all cases of a.
(ii) For n = 4 r + 3 , if a 0 mod 5 or 1 mod 5 , then a 1 0 mod 5 and the theorem second part (2.55) is proven by (2.10) for these two cases like above.
For a 3 mod 5 , one has 2 a 1 1 mod 5 and we need to show (2.57). From (2.9), it is sufficient to show that the product n Q n 2 4 m o d 5 . Relation (2.28) yields
n Q n 2 3 n k = 1 n 1 2 C k 1 n k 1 k mod 5
With (2.60), it yields
3 n k = 1 n 1 2 C k 1 n k 1 k = 3 L n 1
which is always congruent to 4 modulo 5 for all values of n of the form n = 4 r + 3 , as one has
L 4 r + 3 1 = 5 F 2 r + 1 F 2 r + 2 2
as a special case of relations (17a) and (17b) in [33], meaning that (2.65) is always a multiple of 15 minus 6, i.e. always congruent to 4 modulo 5.
For a 2 mod 5 and a 4 mod 5 , one has 2 a 1 2 mod 5 and we need to show (2.56). Again, from (2.9), it is sufficient to show that the product n Q n 2 Δ 3 mod 5 . Relation (2.28) yields then
n Q n 2 n k = 1 n 1 2 2 k 1 C k 1 n k 1 k mod 5
From (76), one has
n k = 1 n 1 2 2 k 1 C k 1 n k 1 k = 2 n 1 1
which is always congruent to 3 modulo 5 for all values of n of the form n = 4 r + 3 . As above, one has then 2 4 r + 2 1 = 4 × 16 r 1 3 mod 10 , as ( 4 × 16 r ) 4 mod 10 . Therefore (2.67) holds for any values of n of the form n = 4 r + 3 . The theorem second part (2.55) to (2.57) is proven for all cases of bases a. □

2.4. Congruence Properties of Generalized Mersenne Numbers and Their Factors

2.4.1. Generalization of a Second Theorem on Mersenne Numbers

For Generalized Mersenne composites, let’s note generally their positive natural integer factors c i such as
G M a , n = c 1 e 1 c 2 e 2 . . . c i e i . . .
where e i are positive natural integer exponents. A theorem on factors of Mersenne numbers states, with the notations in this paper, that if n is an odd prime and if c i divides M n , then c i 1 mod n and c i ± 1 mod 8 .
The first part is not only obviously true for all M n by (2.3), but can be generalized to c i 1 mod 2 n . The second part is also obviously correct for factors c i of Mersenne numbers M n noting that, first, all M n 1 m o d 8 for n 3 ; second, at least one of the factors c i of the Mersenne number M n = G M 2 , n must be congruent to 1 modulo 8; and third that the sum of exponents e i of factors c i which are congruent to 1 modulo 8 must be odd. This is however no longer correct for all G M a , n with a > 2 .
This theorem can be generalized in two steps. The first part is generalized in the following Theorem.
Theorem 6.
For all natural integer bases a 2 , if n is an odd prime and if a positive natural integer c i divides G M a , n , then
c i 1 m o d 2 n
Proof. 
Let a, b, n, m, i, k, c i , f i , f i , λ i , r i , p, q be natural integers with a 2 , n prime, n 3 , m > 1 , k > 0 , c i 1 , p prime, q > 0 and 1 i q .
Proving this theorem is equivalent to show that all prime integer factors of G M a , n are of the form
c i = 2 n f i + 1
Let us assume first the contrary, i.e. that the prime integer factors c i of G M a , n are not of the form (2.71). For q factors c i (the case where their exponents e i 1 can be treated similarly), one has from (2.9) and (2.48)
G M a , n = c 1 c 2 c q = 2 n Q n a + 1 1 mod 2 n
Let us then write generally
c i = 2 n f i + λ i
with the condition that the product
λ 1 λ 2 λ q 1 mod 2 n
i.e. that all λ i are such that λ i 1 mod 2 n or that an even number of λ i are such that λ i 1 mod 2 n , which means that there exist natural integers r i such as λ i = 2 n r i + 1 or λ i = 2 n r i 1 . Then one can write the factors c i as
c i = 2 n f i + r i + 1 o r c i = 2 n f i + r i 1
Let us now assume that an even number of prime factors are of the form c i = 2 n f i 1 . But this is not possible, as it was proven (see [27], p. 267, Nr 2) that all prime factors of a m b m , with a > b and m > 1 , are of the form m k + 1 . This is simply shown considering that if a prime p divides a m b m , and if p does not divide a and b, then by Fermat’s theorem, p divides a p 1 1 and b p 1 1 and then also a p 1 b p 1 and therefore m divides p 1 , i.e. p = m k + 1 .
For b = a 1 , m = n prime and k = 2 f i , it is seen directly that n divides c i 1 if c i is of the form (2.71). Therefore all prime integer factors of G M a , n are of the form (2.71). Furthermore, composite factors of G M a , n are also obviously of the form (2.71), being the product of prime factors of the form (2.71). □
Note that for n = 2 , all factors c i of G M a , 2 are obviously such that c i ± 1 mod 4 .
The second part of the generalization of the theorem on factors of Mersenne numbers needs to specify the congruence of G M a , n modulo 8 as in the following Theorem.
Theorem 7.
For all natural integer bases a 2 and all prime integer exponents n 3 , all G M a , n are such that
G M a , n 1 mod 8 i f a 0 mod 8 o r 1 mod 8
G M a , n 1 mod 8 i f a 1 mod 8 o r 2 mod 8
G M a , n 3 mod 8 i f a 2 mod 8 o r 3 mod 8
G M a , n 3 mod 8 i f a 3 mod 8 o r 4 mod 8
and the factors c i of G M a , n are such that c i ± 1 mod 8 or ± 3 mod 8 such that their product satisfy above relations.
Proof. 
Let a, n, m, r be natural integers with a 2 , n prime, n 3 .
The first part of this theorem is easily demonstrated, noting first from (2.27) that one has
Q n a = S n 2 1 + 2 S n 4 2 + 4 2 S n 6 3 + . . .
Searching for the congruence conditions for m = 8 in (2.52), it yields
G M a , n 1 + n 2 S n 2 1 + 4 2 S n 4 2 + 8 3 S n 6 3 + . . . mod 8
As the coefficient of 3 and the coefficients of all terms in ▵ of higher degrees are multiple of 8, these terms can be removed from (2.81), and replacing by (2.12) and (2.14), it follows that
G M a , n 1 + 2 n + 2 n n 3 2 mod 8
The exponent n being an odd prime, it must be either n = 4 r + 1 or n = 4 r + 3 , yielding respectively from (2.82)
G M a , n 1 + 2 4 2 mod 8 f o r n = 4 r + 1
G M a , n 1 + 6 mod 8 f o r n = 4 r + 3
Calculating the values of 1 + 2 4 2 mod 8 and of 1 + 6 mod 8 for the first eight values of a, 2 a 9 , yields the series 1 , + 3 , 3 , 3 , + 3 , 1 , + 1 , + 1 , that repeats itself indefinitely for successive values of a > 9 , hence relations (2.76) to (2.79) hold.
The second part of the theorem on the congruence of factors c i of G M a , n is then obvious. □
The factorization of the first composites G M a , n is indicated in Tables 2 for n primes, 3 n 11 . It is seen that all the factors c i of composites G M a , n are of the form (2.71) and are either G M a , n ± 1 m o d 8 or ± 3 m o d 8 such as their products satisfy relations (2.76) to (2.79).
Composite G M a , n can be written generally in function of their prime integer factors, from (2.69) and (2.71),
G M a , n = c 1 e 1 c 2 e 2 . . . c i e i . . . = 2 n f 1 + 1 e 1 2 n f 2 + 1 e 2 . . . 2 n f i + 1 e i . . .
In the case of more than two prime integer factors and for exponents e i 1 , a composite G M a , n can also be written in all generality as the product of two factors not necessarily primes and with their exponents e i = 1 , as any combination of products of factors c i of the form (2.71) will be of the same form (2.71)
G M a , n = c 1 c 2 = 2 n f 1 + 1 2 n f 2 + 1
Therefore, a corollary of the above Theorem 7 is as follows.
Corollary 8.
For all natural integer bases a 2 and all prime integer exponents n 3 , a natural integer c i = 2 n f i + 1 divides a G M a , n if and only if the integer function Q n a associated to the G M a , n is such that
Q n a f i mod c i
for all factors c i and where f i are natural integers.
Proof. 
Let a, n, r be natural integers with a 2 , n prime, n 3 .
Relation (2.87) obviously holds whether G M a , n is prime or composite. For two factors like in (2.86), one has
G M a , n = 2 n Q n a + 1 = 2 n f 1 + 1 2 n f 2 + 1 = 2 n f 2 c 1 + f 1 + 1
yielding immediately (2.87). If G M a , n is prime, then f 2 = 0 and f 1 = Q n a .
Conversely, if the integer function Q n ( a ) is such that (2.87) holds with c 1 = ( 2 n f 1 + 1 ) , then it exists an integer r such as
Q n ( a ) = r c 1 + f 1
yielding
2 n Q n ( a ) + 1 = 2 n r c 1 + 2 n f 1 + 1 = ( 2 n f 1 + 1 ) ( 2 n r + 1 ) = c 1 c 2 = G M a , n
meaning that c 1 divides G M a , n for an appropriate choice of the integer r, which is here f 2 in the second factor c 2 of G M a , n . This relation (2.87) is true whether the factors c 1 and c 2 are composites or primes of the form (2.71). □
From Table 2, it is seen that the integers f 1 , f 2 , ..., f i , ... in (2.85) for a particular prime exponent n are increasing from one composite number to the next for increasing values of the base a and can be found in function of the integer functions Q n ( a ) .

2.4.2. Generalization of a Third Theorem on Mersenne Numbers (Euler Theorem)

Another theorem on Mersenne numbers was stated by Euler in 1750. With the notations in this paper, it reads: if n is prime, n 3 mod 4 , then 2 n + 1 divides M n if and only if 2 n + 1 is a prime; in this case, if n > 3 , then M n is composite. This means that for n 3 mod 4 and prime, M n = G M 2 , n has the factor c 1 = ( 2 n f 1 + 1 ) with f 1 = 1 , and that c 1 in this case is prime. This is exactly the case for n = 3 and M 3 = G M 2 , 3 = 7 ; n = 11 and M 11 = G M 2 , 11 = 2047 = 23 × 89 ; and so on. This can be generalized for all G M a , n for odd primes n, irrespective of n being congruent to 3 m o d 4 or not, in the following theorem.
Theorem 9.
For all natural integer bases a 2 and all prime integer exponents n 3 , a natural integer c i = 2 n f i + 1 divides G M a , n if and only if, for some natural integer values of f i , c i = 2 n f i + 1 is prime or a composite formed by the product of primes of the form 2 n j + 1 , with i and j natural integers.
Before demonstrating this theorem, it is important to realize that not all integer values of f i will do in Theorem 9, only those that render the factor c i prime or composite of the form 2 n f i + 1 will be acceptable. All other integer values of f i are excluded and are called excluded values. The following Lemma is demonstrated giving the form that factors c i cannot take and the form of excluded values of f i .
Lemma 10.
For all natural integer bases a 2 and all prime integer exponents n 3 , a natural integer c i = 2 n f i + 1 divides a G M a , n if c i and f i are different from excluded values, i.e. different respectively from either (i)
c i 0 mod 2 n k + 1 and f i k mod 2 n k + 1
for positive natural integers k = 2 n u v + u ε + v δ + r , with u, v and r positive natural integers such as u v 0 , ε and δ integers 0 and 1 and such as ε δ 1 mod 2 n = 2 n r + 1 ; or (ii)
c i 0 mod 2 n k 1 and f i k mod 2 n k 1
for positive natural integers k; or (iii)
c i 0 mod 2 n k ± t and f i α + k β mod 2 n k + γ
for natural integers k, for odd natural integers t such that 1 < t < n , for integers α, β, γ, with β and γ odd integers and 2 n α + 1 = β γ .
Proof. 
Let a, n, i, j, k, c i , f i , s, u, v, x, y be natural integers with a 2 , n prime, n 3 , and α , β , γ , δ , ε , r integers and δ 0 and ε 0 .
From Theorem 6, factors c i of a G M a , n are
c i = 2 n f i + 1 1 mod 2 n
Let’s assume in all generality that f i can be written as
f i x mod y
for yet unknown natural integers x and y. For a given prime n, for f i to be excluded values, (2.93) must not be verified for all bases a. Among all possible values of f i , it will be the case if in (2.93)
c i = 2 n f i + 1 0 mod y
meaning that
2 n x + 1 0 mod y
is a multiple of y. Writing in all generality x = α + k β and y = 2 n k + γ , one has from (2.94)
f i α + k β mod 2 n k + γ = 2 n k + γ s + α + k β
with α , β , γ integers and k and s natural integers. Replacing in (2.96) yields
2 n α + k β + 1 0 mod 2 n k + γ
or
β 2 n α + 1 β + 2 n k 0 mod 2 n k + γ
which gives the condition
2 n α + 1 = β γ
where β and γ are obviously odd integers, either positive and/or negative depending on the sign of α . The factors c i read then from (2.95) and (2.97) with (2.100)
c i = 2 n 2 n k + γ s + α + k β + 1 = 2 n k + γ 2 n s + β
All f i of the form (2.97) are excluded values and all c i of the form (2.101) cannot be factors of G M a , n for every integers α , β , γ complying with (2.100) and for all natural integers k, except for the following specific cases.
(i) First, for the triplet α , β , γ = 0 , 1 , 1 verifying (2.100), f i (2.97) and factors c i (2.101) read respectively
f i k mod 2 n k + 1 = 2 n k + 1 s + k
c i = 2 n 2 n k + 1 s + k + 1 = 2 n k + 1 2 n s + 1
If for certain positive integers k, 2 n k + 1 is prime, then by Theorem 6, c i (2.103) are factors of a G M a , n and f i (2.102) are not excluded values.
If for other positive integers k, 2 n k + 1 is composite, it can be written as
2 n k + 1 = 2 n u + δ 2 n v + ε
with the obvious condition
δ ε 1 m o d 2 n = 2 n r + 1
where u and v are natural integers with u and v not simultaneously null; δ , ε and r are integers with δ 0 and ε 0 ; and
k = 2 n u v + u ε + v δ + r
As k must be a natural integer, only the values of δ and ε complying with (2.105) must be considered. For δ = ε = 1 (i.e., r = 0 ), k = 2 n u v + u + v and the factors of 2 n k + 1 are
2 n k + 1 = 2 n u + 1 2 n v + 1
showing that f i (2.102) with (2.107) are not excluded values, similarly to the above case of 2 n k + 1 being prime.
For all the other cases of values of k in (2.106) with δ and ε integers 0 and 1 , and complying with (2.105), the factors c i from (2.103) read
c i = 2 n s + 1 2 n u + δ 2 n v + ϵ
which, by Theorem 6, cannot be factors of a G M a , n and the corresponding f i (2.102) are excluded values. For example, with δ = ε = 1 (i.e. r = 0 ), the factors of 2 n k + 1 are 2 n u 1 2 n v 1 , showing from (2.103) that c i = 2 n s + 1 2 n u 1 2 n v 1 cannot be factors of a G M a , n and that the corresponding f i are excluded values.
(ii) Second, for the triplet α , β , γ = 0 , 1 , 1 verifying (2.100), f i (2.97) and factors c i (2.101) read respectively
f i k mod 2 n k 1 = 2 n k 1 s k
c i = 2 n 2 n k 1 s k + 1 = 2 n k 1 2 n s 1
showing again by Theorem 6 that c i (2.110) cannot be factors of a G M a , n and that f i (2.109) are excluded values for all positive integers k.
(iii) Third, for the general case where α 0 , from (2.100), both β and γ are obviously 1 and therefore again by Theorem 6, c i (2.101) cannot be factors of a G M a , n and all f i (2.97) are excluded values for all natural integers k.
Summarizing, the excluded values of f i and the excluded forms of factors c i are respectively (2.90) for positive integers k (2.106) with δ and ε integers 0 and 1 ; (2.91) for all positive integers k; and (2.92) for all integers α , all odd integers β and γ complying with (2.100), all natural integers k and all t odd integers such that 1 < t < n , as, from the form of factors c i (2.101),
t β mod 2 n k o r t γ mod 2 n k
The excluded forms of factors c i (2.92) are always composites and the product of at least two factors, which are multiple of integers of the form 2 n j 1 and/or 2 n j ± t with j natural integers and at least once j = k . □
Theorem 9 can now be demonstrated as follows.
Proof. 
Let a , n , i , j , k , c i , f i be natural integers with a 2 , n prime, n 3 .
The first part of the demonstration is quite straightforward as from Theorem 6 above, all natural integer prime and composite factors of G M a , n are of the form (2.71).
Conversely, if an natural integer c 1 = 2 n f 1 + 1 is prime or a composite formed by the product of primes of the form 2 n j + 1 , then, for a suitable choice of an integer f 2 , a natural integer function Φ n can be found and written as
Φ n = f 2 2 n f 1 + 1 + f 1
The suitable choice of the integer f 2 means here that it must not be an excluded value specifically for the prime exponent n as shown in Lemma 10, i.e. that c 2 = 2 n f 2 + 1 must itself be either a prime or a composite formed by the product of primes of the form 2 n j + 1 . Relation (2.112) then yields
Φ n f 1 mod 2 n f 1 + 1
and by the Corollary 8 above, c 1 = 2 n f 1 + 1 divides G M a , n = 2 n Φ n + 1 , i.e. there is a base a for which the integer function Q n a in (2.4) specific for each prime exponent n is equal to Φ n (2.112). □
We emphasize that not all integer values of f 1 and f 2 will do and that the integer f 2 must be chosen suitably, such that the factors c 1 = 2 n f 1 + 1 and c 2 = 2 n f 2 + 1 are prime or composite formed by the product of primes of the form 2 n j + 1 . All other values of f 1 and f 2 are excluded values as shown in Lemma 10.

2.4.3. Theorem on congruence of coefficients f 1 and f 2

The form of the integers f 1 and f 2 in the factors c 1 and c 2 of composite G M a , n can be determined in function of the exponent n, the base a and the factors c 1 and c 2 by the following theorem.
Theorem 11.
If a composite G M a , n has c 1 = 2 n f 1 + 1 and c 2 = 2 n f 2 + 1 as two factors, then f 1 u mod 4 and f 2 v mod 4 with u and v = 0 , 1, 2 or 3, depending on congruence of n mod 4 and on congruence of a mod 8 , as shown in Table 3.
Table 3. Congruence of natural integers f 1 and f 2 mod 4 .
Table 3. Congruence of natural integers f 1 and f 2 mod 4 .
For n 1 mod 4
c 1 f 1 if a 0 or 1 ( mod 8 )   f 2 if a 2 or 7 ( mod 8 )   f 2 if a 3 or 6 ( mod 8 )   f 2 if a 4 or 5 ( mod 8 )   f 2
1 mod 8 0 mod 4 0 mod 4 3 mod 4 1 mod 4 2 mod 4
3 mod 8 1 mod 4 1 mod 4 2 mod 4 0 mod 4 3 mod 4
5 mod 8 2 mod 4 2 mod 4 1 mod 4 3 mod 4 0 mod 4
7 mod 8 3 mod 4 3 mod 4 0 mod 4 2 mod 4 1 mod 4
For n 3 mod 4
c 1 f 1 if a 0 or 1 ( mod 8 )   f 2 if a 2 or 7 ( mod 8 )   f 2 if a 3 or 6 ( mod 8 )   f 2 if a 4 or 5 ( mod 8 )   f 2
1 mod 8 0 mod 4 0 mod 4 1 mod 4 3 mod 4 2 mod 4
3 mod 8 3 mod 4 3 mod 4 2 mod 4 0 mod 4 1 mod 4
5 mod 8 2 mod 4 2 mod 4 3 mod 4 1 mod 4 0 mod 4
7 mod 8 1 mod 4 1 mod 4 0 mod 4 2 mod 4 3 mod 4
The demonstration of this theorem is based on the above Theorems 7 and 9.
Proof. 
Let a , n , i , j , c i , f i , u , v be natural integers with a 2 , n prime, n 3 and α , β , γ integers. Let c 1 and c 2 be the two factors of G M a , n = c 1 c 2 . From Theorem 9, c 1 and c 2 are primes of the form 2 n f 1 + 1 and/or composites of the form of a product of integers 2 n j + 1 . From Theorem 7, one has
G M a , n α mod 8
with c 1 β mod 8 and c 2 γ mod 8 where α , β and γ take values either ± 1 or ± 3 , with the obvious condition that
α β γ mod 8
which then yields by Theorem 7
β = γ f o r α = + 1 i . e . , for a 0 mod 8 or 1 mod 8
β = γ for α = 1 i . e . , for a 2 mod 8 or 7 mod 8
β = γ + 4 for α = + 3 i . e . , for a 3 mod 8 or 6 mod 8
β = γ 4 for α = 3 i . e . , for a 4 mod 8 or 5 mod 8
For
c 1 = 2 n f 1 + 1 β mod 8
one has for
n 1 mod 4 : f 1 β 1 2 mod 4 u mod 4
n 3 mod 4 : f 1 1 β 2 mod 4 u mod 4
and f 2 v mod 4 is found by replacing in (2.121) and (2.122) β in function of γ from (2.116) to (2.119) depending on the prime exponent n and the base a. Hence, congruences given in Table 3 hold. □
Note that for Mersenne numbers (i.e., for a = 2 in Table 3), c 1 1 mod 8 or 7 mod 8 , yielding that f 1 and f 2 are congruent to 0 mod 4 and/or 3 mod 4 for n 1 mod 4 , and f 1 and f 2 are congruent to 0 mod 4 and/or 1 m o d 4 for n 3 m o d 4 .

3. Results and discussion

Distributions of primes and composites in Generalized Mersenne numbers are further investigated in two companion papers. However, Generalized Mersenne numbers as presented in this paper are useful to approach the problem of why most of the Mersenne numbers with prime exponents are not themselves primes. It was mentioned in the introduction that composite and prime Generalized Mersenne numbers appear apparently at random for different values of the exponent n and the base a. It is seen also that prime Generalized Mersenne numbers can be found for larger values of the base a for exponents n that yield Mersenne composites, like, e.g., for n = 11 , 23 , 29 , . . . It appears that some exponents n are less “productive” than others to yield Generalized Mersenne primes. The reason for this is still unknown but it shows that Mersenne numbers that are composite for prime exponents are nothing exceptional and are simply Generalized Mersenne composites for a = 2 . Sequences of Generalized Mersenne numbers, primes, bases, and exponents can be found online at the Online Encyclopedia of Integer Sequences (OEIS) [28]; see Table 4.
The density of Mersenne primes is also very low. Let’s consider the largest known Mersenne prime M 82589933 = 2 82589933 1 , having 24862048 digits,
Table 4. OEIS references of sequences of Generalized Mersenne numbers, primes, bases and exponents for k integers.
Table 4. OEIS references of sequences of Generalized Mersenne numbers, primes, bases and exponents for k integers.
n GM a , n GM a , n primes
numbers primes a #for  a 10 k # < 10 k 10 k 1 < # < 10 k
2 A005408 A000040 A006880 A006879
3 A003215 A002407 A002504 A221794 A113478 A221792
5 A022521 A121616 A121617 A221849 A221846 A221847
7 A022523 A121618 A121619 A221980 A221977 A221978
11 A022527 A189055 A211184 A221986 A221983 A221984
13 A022529
17 A022533
19 A022535
23 A022539
Notes: # means “Number of G M a , n primes”. For n = 2 , the first prime, 2, must be removed from the sequences indicated in the first row as G M a , 2 generates only all the odd integers. In some sequences, a shift of one unity must be applied.
If we compare the number of known Mersenne primes, 51, to first, the number of all the primes less than 10 24862048 that can be approximated from the prime number theorem as Π 10 24862048 10 24862048 / ln 10 24862048 , i.e. approximately 1.75 10 24862042 , and second to the number of Mersenne numbers with prime exponents, i.e. the number of primes less than 82589933, i.e., Π 82589933 82589933 / ln 82589933 , or approximately 4530590, we see that the density of Mersenne primes is extremely low, in the order of 2.1 10 24862041 and 1.1 10 5 respectively for the first and second cases.
Mersenne primes are used in cryptography (see, e.g., [1,3,7,18,31,32]). But to fix the ideas, only medium-sized Mersenne primes are used in cryptography. So the search for larger Mersenne primes doesn’t have applications in cryptography. Generally speaking, there are two applications of Mersenne primes within cryptography [9]:
- As a modulus within a prime elliptic curve: for example, the Mersenne prime 2 521 1 is used to define an elliptic curve.
- In the Carter-Wegman Counter (CWC) mode [19], the Mersenne prime 2 127 1 is used to define a universal hash function consisting of evaluating a polynomial modulo the Mersenne prime 2 127 1 .
In both cases, the special property that is taken advantage of is that Mersenne primes (rather than another prime of approximately the same size) make computing the modulo operation x mod 2 521 1 or x mod 2 127 1 easy by the linear-feedback shift register (LFSR). More generally, performing modular reduction modulo a Mersenne prime does not modify the hamming weight of the result.
On the other hand, in Asymmetric Key Cryptography, a pair of keys is used to encrypt and decrypt information. A receiver’s public key is used for encryption and a receiver’s private key is used for decryption. Public keys and Private keys are different. Even if the public key is known by everyone, the intended receiver can only decode it because he alone knows his private key. The most popular asymmetric key cryptography algorithm is the Rivest–Shamir–Adleman (RSA) algorithm [24]. The practical difficulty of factoring the product of two large prime numbers is what makes the RSA algorithm secure.
As seen, the number of Mersenne primes is relatively limited, and a fortiori, those of medium size are even less. As an alternative for asymmetric key cryptography, we propose to use Generalized Mersenne primes which are more frequent even for small prime exponents and for which both the base a and the exponent n can be used either as public keys or secret keys.

4. Conclusions

It was shown that with the proposed generalization of Mersenne numbers, for any natural integer base a, Generalized Mersenne numbers are in general such that G M a , n 1 are even and divisible by n, a and a 1 for any odd prime exponent n and by a a 1 + 1 for any prime exponent n > 5 . The remaining factor is a function of triangular numbers of a 1 , specific to each prime exponent n. Four theorems on Mersenne numbers were generalized for Generalized Mersenne numbers and four new theorems were demonstrated, allowing to show first, that G M a , n 1 are divisible by 6, and more precisely G M a , n are congruent to 1 mod 12 or 7 mod 12 depending on the congruence of the base a m o d 4 ; second, that G M a , n 1 are divisible by 10 if n 1 mod 4 and, if n 3 m o d 4 , G M a , n 1 m o d 10 , or 7 m o d 10 or 9 m o d 10 depending on the congruence of the base a m o d 5 ; third, that all factors c i of G M a , n are of the form 2 n f i + 1 with f i natural integers such that c i is prime itself or the product of primes of the form 2 n j + 1 with j natural integer; fourth, that for odd prime exponents n, all G M a , n are periodically congruent to either ± 1 mod 8 or ± 3 mod 8 depending on the congruence of the base a m o d 8 ; and fifth, that the factors of a composite G M a , n is of the form 2 n f i + 1 with f i u mod 4 and u being either 0, 1, 2 or 3 depending on the congruence of the exponent n m o d 4 and on the congruence of the base a m o d 8 . Finally, the potential use of Generalized Mersenne primes in cryptography has been shortly addressed.
Distributions of primes and composites in Generalized Mersenne numbers are further investigated in two companion papers.

Funding

This research received no external funding.

Data Availability Statement

There are no data associated with this work.

Acknowledgments

The help of Prof. D. Huylebrouck is acknowledged. The author is indebted to D. Hensley for providing the general solution of (2.59). This research was conducted under the good auspice of the European Space Agency Technical and Research Centre (The Netherlands).

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Aggarwal, D.; Joux, A.; Prakash, A.; Santha, M.; A new public-key cryptosystem via Mersenne numbers, in: Advances in Cryptology—CRYPTO 2018, Lecture Notes in Comput. Sci. 10993, Springer, Berlin, 459–482, 2018. Available online: https://link.springer.com/chapter/10.1007/978-3-319-96878-0_16 (accessed on 10 January 2023).
  2. Benjamin, A.T.; Quinn, J.J. Proofs that really count, Mathematical Association of America, 2003.
  3. Beunardeau, M.; Connolly, A.; Géraud, R.; Naccache, D. On the hardness of the Mersenne Low Hamming Ratio assumption, Technical report, Cryptology ePrint Archive, 2017/522, 2017.
  4. Caldwell, C.K. Available online: http://primes.utm.edu/mersenne/index.html#known (accessed on 10 January 2023).
  5. Chung, J.; Hasan, A. More Generalised Mersenne number, Report CORR 03-17, University of Waterloo, 2003.
  6. J.H. Conway, R.K. Guy, The book of Numbers, Springer-Verlag, New-York, 1996, 38-56.
  7. Coron, J.S.; Gini, A. Improved cryptanalysis of the AJPS Mersenne based cryptosystem, J. Math. Cryptol., 14: 218–223, 2020. Available online: https://doi.org/10.1515/jmc-2019-0027 (accessed 31 January 2024).
  8. Crandall, R.E. Method and apparatus for public key exchange in a cryptographic system, U.S. Patent # 5,159,632, 1992. [Google Scholar]
  9. Cryptography Stack Exchange, What is the use of Mersenne Primes in cryptography, 2014. Available online: https://crypto.stackexchange.com/questions/19759/what-is-the-use-of-mersenne-primes-in-cryptography/19763#19763 (accessed on 5 February 2024).
  10. Angel, J.D.J.; Morales-Luna, G. Counting prime numbers with short binary signed representation, Available online: http://eprint.iacr.org/2006/121, 2006.
  11. L.Y. Deng, Generalized Mersenne Prime Number and Its Application to Random Number Generation, in Niederreiter, H. (eds) Monte Carlo and Quasi-Monte Carlo Methods 2002. Springer, Berlin, Heidelberg, 2004. Available online: https://doi.org/10.1007/978-3-642-18743-8_9 (accessed 31 January 2024).
  12. Dunlap, R.A. The Golden Ratio and Fibonacci Numbers, World Scientific Press, 1997.
  13. Great Internet Mersenne Prime Search GIMPS, Available online:. Available online: https://www.mersenne.org/primes/ (accessed on 10 January 2023).
  14. Hensley, D. personal communication via D. Huylebrouck. 20 October.
  15. V.E. Hoggatt Jr. Fibonacci and Lucas number, Houghton Mifflin, 1969.
  16. Hoque, A.; Saikia, H.K. On generalized Mersenne prime, SeMA 66, 1–7, 2014. Available online: https://doi.org/10.1007/s40324-014-0019-4 (accessed 31 January 2024).
  17. Hoque, A.; Saikia, H.K. On generalized Mersenne Primes and class-numbers of equivalent quadratic fields and cyclotomic fields, SeMA 67, 71–75, 2015. Available online: https://doi.org/10.1007/s40324-014-0027-4 (accessed 31 January 2024).
  18. Kalita, J.; Hoque, A.; Kalita, H. A new cryptosystem using generalized Mersenne primes, SeMA 73, 77–83, 2016. Available online: https://doi.org/10.1007/s40324-015-0056-7 (accessed 31 January 2024).
  19. Kohno, T.; Viega, J.; Whiting, D. CWC: A high-performance conventional authenticated encryption mode, in Fast Software Encryption, Lecture Notes in Computer Science, Vol. 3017, W. Meier and B. Roy eds., Springer-Verlag, 408–426, 2004. Available online: https://eprint.iacr.org/2003/106.pdf (accessed 5 February 2024). [CrossRef]
  20. Koshy, T. Fibonacci and Lucas Numbers with Application, Wiley-Interscience, 2001.
  21. Lucas, E. Théorie des Fonctions Numériques simplement Périodiques, Am. J. Mathematics vol. 1, 1878, 184-240, 289-321.
  22. Pletser, V. ; Divisibility of products of two consecutive Fibonacci and Lucas numbers for prime sum of indices, Problem B-1037, Fibonacci Quarterly, Vol. 45-3, p. 277, 2007.
  23. Ribenboim, P. The book of prime number records, 2nd ed., Springer-Verlag, New-York, 1989, 75-81.
  24. Rivest, R.; Shamir, A.; Adleman, L. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems, Communications of the ACM. 21 (2), 120–126, 1978. Available online: https://web.archive.org/web/20230127011251/http://people.csail.mit.edu/rivest/Rsapaper.pdf (accessed 31 January 2024). [CrossRef]
  25. Schroeder, M.R. Number Theory in Science and Communication, 2nd ed., Springer-Verlag, Berlin, 1986, 72-73.
  26. Seibert, J. Fibonacci and Lucas Products Modulo A Prime, Solution Problem B-1037. Fibonacci Quarterly, Vol. 46-47, p. 88, 2008-2009.
  27. Sierpinski, W. Elementary Theory of Numbers, 2nd ed., Ed. S. Schinzel, Elsevier, Amsterdam, and PWN, Warsaw, 1988, 360-362.
  28. Sloane, N.J.A. The Online Encyclopedia of Integer Sequences. Available online: https://oeis.org/ (accessed on 5 February 2024).
  29. Solinas, J. Generalized Mersenne numbers, Technical Report CORR 99-39, University of Waterloo, 1999.
  30. Solinas, J. Cryptographic identification and digital signature method using efficient elliptic curve, U.S. Patent # 6,898,284, 2005. [Google Scholar]
  31. Solinas, J.A. Mersenne Prime. In: van Tilborg, H.C.A., Jajodia, S. (eds) Encyclopedia of Cryptography and Security. Springer, Boston, MA, 2011. Available online: https://doi.org/10.1007/978-1-4419-5906-5_37 (accessed 31 January 2024).
  32. Tiepelt, M.; D’Anvers, J.P. Exploiting Decryption Failures in Mersenne Number Cryptosystems, APKC ’20: Proceedings of the 7th ACM Workshop on ASIA Public-Key Cryptography, 45–54, 2020. Available online: https://doi.org/10.1145/3384940.3388957 (accessed 31 January 2024).
  33. Vajda, S. Fibonacci and Lucas numbers, and the Golden Section: Theory and Applications, Halsted Press, 1989.
  34. Weisstein, E.W. Mersenne Prime, from Mathworld – a Wolfram Web Resource. Available online: http://mathworld.wolfram.com/MersennePrime.html (accessed on 10 January 2023).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated