1. Introduction
It is known that if a Mersenne number of the form
is prime, then
n is prime. The reciprocal is not true, as for example for
,
is composite,
(for review, see e.g., [
4,
23,
34]). There are 51 Mersenne prime numbers known [
13]. The largest appears for
,
, 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
where
C is a small odd natural integer number; then by Solinas [
29,
30,
31] of the form
which generalized also Fermat numbers and where
, 0 or
,
and
n are multiple of
s, the length of a computer word (e.g.
); and finally further generalized [
10] in the form
with
n,
k and
natural integers,
,
and
, 0 or
. Hoque and Saikia proposed [
16,
17] another definition of generalized Mersenne numbers as
where
are positive integers. Deng introduced [
11] a different definition of generalized Mersenne primes which is of the form
, where
and
are prime numbers.
In this paper, we propose another generalized definition of Mersenne numbers of the form
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 (
) numbers, referring to the fact that both the base
a and the exponent
n can take any integer values
.
Generalized Mersenne numbers are defined in
Section 2.1.
Section 2.2 gives several decompositions of
. Several theorems on congruence of Mersenne numbers are generalized for
in
Section 2.3. Congruence properties of
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
power of the first two successive integers
By extension, Generalized Mersenne (GM) numbers, noted
, are defined as the difference of the
power of two successive integers
and indexed by the base
a and the exponent
n, with
and
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, with r and s natural positive integers, then all are binomial numbers, having or 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 numbers for the first five primes , with prime and composite numbers shown respectively in bold and italic characters.
For
, (
2.2) yields all the odd integers
. For
, the first four
numbers are prime for
to 5; further numbers are composite or prime without any seemingly regular pattern. For
and 7 and
,
and
are the Mersenne primes
and
. For
, interesting patterns occur in the two
and
series. For
and 4,
and
are oppositely prime and composite. For
,
and
are both composites. For
to 12,
and
are oppositely primes and composites again, with a series of composite
and prime
for
to 10. For
to 19,
and
are composites or primes for same values of
a. For larger values of
a, regular patterns between
and
disappear and reappear for certain ranges of values of
a. For
, the first four
are composite (the fifth Mersenne number
is not prime). Among the first 25
, the values for
, 8, 10 and 14 yield prime numbers.
It is observed that, for odd values of
n with
, the series of
numbers generated for successive values of the base
a have 1 as last digit, while for odd values of
n with
, the series of the last digit of
numbers are repetitions of the sequence 1, 7, 9, 7, 1 respectively for bases
, 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 numbers for , 3, 5, 7, 11.
Table 1.
First 25 numbers for , 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
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, , all Generalized Mersenne numbers can be written as
for all prime exponents and for all bases a, and where is a polynomial in a of degree .
Proof. Let
a,
n,
i and
j be natural integers, with
n prime,
and
. Posing
with
the binomial coefficient, writing Δ for convenience for the triangular number of
,
, and noting that the exponent
n is odd, developing the polynomial (
2.2) yields
where, for
,
and for
,
Relation (
2.6) shows that the form (
2.4) is obtained where the positive integer function
is only function of the variable
a and is a polynomial in
a of degree
. □
One can characterize further the integer function for higher values of n as follows.
Theorem 2.
For a and n natural integers, , all Generalized Mersenne numbers can be written as
for all prime exponents , and as
for all prime exponents and for all bases a, where and are polynomials in the variable only, the triangular number of , and of degrees and respectively.
Proof. Let
a,
n,
i,
j,
J,
k and
K be natural integers, with
n prime,
and
. Continuing from (
2.6) the development of the polynomial (
2.2) in
successive iterations, one obtains an expression of
of the form of either (i)
embedded products in the new variable
or (ii) a polynomial of degree
in ▵.
(i) By arranging similarly the terms
in successive differences, a second iteration yields from (
2.6)
where
Repeating the process of rearranging the terms
, the third iteration yields from (
2.11)
where
that can be easily demonstrated from the equality for odd
n
Further iterations yield successively from (
2.13)
...,
iteration (for
):
where
The iteration process stops after
iterations yielding finally the
embedded products
The independent terms are
that can be transformed by a change of index
in
and where Vandermonde’s convolution was used, yielding
,
,
,
, ... The last independent term (the one in the middle of (
2.19)) is found for
, yielding
The independent terms before the last one can also be written as
or more generally for
to
(ii) Instead of embedded products, a polynomial expression can be found from (
2.19) in the form
The positive integer function
in (
2.4) can be deduced as a function of Δ either from (
2.19)
or from (
2.25)
The positive integer function
in (
2.9) can be deduced from (
2.26) or (
2.27) with (
2.21)
For
, factoring the right side of (
2.25) by
yields
The positive integer function
in (
2.10) is deduced further from (
2.29)
or inversely, by inverting the sums,
Therefore, the general form of all
can be written as in (
2.9) and (
2.10) for
n prime, respectively
and
, where the positive integer functions
and
are polynomials of only the triangular number
as variable and of degrees respectively
and
. □
Note that for large values of the exponent
n, the calculation of
becomes quickly intractable as
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
.
For very large values of
a and
n, the value of a
is dominated by the first term in the polynomial (
2.25) and can therefore be approximated by
for
and
n prime
, 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
yields
while the polynomial expression (
2.29) gives, with further factorization,
etc, where, to recall, ▵ is written for
and where several factorizations are possible for
. As a further example, Tables 2 show the first ten values of
for prime exponents
n from 3 to 11, with the decomposition (
2.33), (
2.34), (
2.39) and (
2.40) in integer factors of
.
Table 2.
Decomposition of Generalized Mersenne numbers for .
Table 2.
Decomposition of Generalized Mersenne numbers for .
|
|
Decomposition of
|
7 |
|
prime |
19 |
|
prime |
37 |
|
prime |
61 |
|
prime |
91 |
|
|
127 |
|
prime |
169 |
|
|
217 |
|
|
271 |
|
prime |
|
|
Decomposition of
|
31 |
|
prime |
211 |
|
prime |
781 |
|
|
2101 |
|
|
4651 |
|
prime |
9031 |
|
|
15961 |
|
|
26281 |
|
|
40951 |
|
|
|
|
Decomposition of
|
127 |
|
prime |
2059 |
|
|
14197 |
|
prime |
61741 |
|
|
201811 |
|
|
543607 |
|
prime |
1273609 |
|
prime |
2685817 |
|
prime |
5217031 |
|
prime |
|
|
Decomposition of
|
2047 |
|
|
175099 |
|
|
4017157 |
|
|
44633821 |
|
|
313968931 |
|
prime |
1614529687 |
|
|
6612607849 |
|
prime |
22791125017 |
|
|
68618940391 |
|
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 , all Generalized Mersenne numbers are such that
for all natural integer prime exponents and
for all natural integer prime exponents .
Proof. Let
a and
n be natural integers with
and
n prime,
. Relation (
2.43) holds obviously from (
2.9) or from (
2.2) by Fermat’s little theorem. More precisely, all
are such that
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 , obviously as 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, , then . This theorem is generalized as follows
Theorem 4.
For all natural integer bases , and for all natural integer prime exponents , all Generalized Mersenne numbers are such that
and more precisely,
Proof. Let
a,
n,
m be natural integers with
and
n prime,
. Noting first from (
2.9) and (
2.48) that one can write in all generality
(
2.49) is easily demonstrated for
. For
, (
2.52) reduces directly to (
2.49). For
, replacing
in (
2.52) by (
2.10) yields
As
is a multiple of 3 if
or
and
is a multiple of 3 if
, (
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
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 , and for natural integer prime exponents , all Generalized Mersenne numbers are such that, if ,
and, if ,
Proof. Let a, i, k, n, m, r be natural integers with and n prime, , and let be an integer and ▵ is written for for convenience.
(i) For the first case
, (
2.54) is immediate for
by (
2.9).
For
, we have to show that
or
. If
or
, then
and (
2.54) is proven by (
2.10) for these two cases.
For
, one has
and (
2.28) yields
Hensley established [
14] a computer assisted proof, based on the Zeilberger algorithm, and confirmed by a Maple computation, showing that
For
and
, (
2.59) simplifies into
where the definition of Lucas numbers
in function of the golden ratio was used (see relations (62) in [
33] and (70) in [
12]). This expression (
2.60) is always
for
n prime of the form
, as
where transformations of Lucas numbers
into Fibonacci numbers
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
for
prime
is divisible by
n. Therefore,
in (
2.58) and (
2.54) holds for
.
For
and
, one has
and (
2.28) yields
For
and
, (
2.59) simplifies directly into
which is always congruent to 0 modulo 5 for
n prime of the form
. Indeed, one has
, and as
, then
, meaning that
is a multiple of 5. Furthermore, by Fermat’s theorem,
is always divisible by
n if
n is prime. Therefore
and relation (
2.62) holds for
n prime of the form
. The theorem first part (
2.54) is then proven for all cases of
a.
(ii) For
, if
or
, then
and the theorem second part (
2.55) is proven by (
2.10) for these two cases like above.
For
, one has
and we need to show (2.57). From (
2.9), it is sufficient to show that the product
. Relation (
2.28) yields
With (
2.60), it yields
which is always congruent to 4 modulo 5 for all values of
n of the form
, as one has
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
and
, one has
and we need to show (2.56). Again, from (
2.9), it is sufficient to show that the product
. Relation (
2.28) yields then
From (76), one has
which is always congruent to 3 modulo 5 for all values of
n of the form
. As above, one has then
, as
. Therefore (
2.67) holds for any values of
n of the form
. 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
such as
where
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
divides
, then
and
.
The first part is not only obviously true for all
by (
2.3), but can be generalized to
. The second part is also obviously correct for factors
of Mersenne numbers
noting that, first, all
for
; second, at least one of the factors
of the Mersenne number
must be congruent to
modulo 8; and third that the sum of exponents
of factors
which are congruent to
modulo 8 must be odd. This is however no longer correct for all
with
.
This theorem can be generalized in two steps. The first part is generalized in the following Theorem.
Theorem 6.
For all natural integer bases , if n is an odd prime and if a positive natural integer divides , then
Proof. Let a, b, n, m, i, k, , , , , , p, q be natural integers with , n prime, , , , , p prime, and .
Proving this theorem is equivalent to show that all prime integer factors of
are of the form
Let us assume first the contrary, i.e. that the prime integer factors
of
are not of the form (
2.71). For
q factors
(the case where their exponents
can be treated similarly), one has from (
2.9) and (
2.48)
Let us then write generally
with the condition that the product
i.e. that all
are such that
or that an even number of
are such that
, which means that there exist natural integers
such as
or
. Then one can write the factors
as
Let us now assume that an even number of prime factors are of the form
. But this is not possible, as it was proven (see [
27], p. 267, Nr 2) that all prime factors of
, with
and
, are of the form
. This is simply shown considering that if a prime
p divides
, and if
p does not divide
a and
b, then by Fermat’s theorem,
p divides
and
and then also
and therefore
m divides
, i.e.
.
For
,
prime and
, it is seen directly that
n divides
if
is of the form (
2.71). Therefore all prime integer factors of
are of the form (
2.71). Furthermore, composite factors of
are also obviously of the form (
2.71), being the product of prime factors of the form (
2.71). □
Note that for , all factors of are obviously such that .
The second part of the generalization of the theorem on factors of Mersenne numbers needs to specify the congruence of modulo 8 as in the following Theorem.
Theorem 7.
For all natural integer bases and all prime integer exponents , all are such that
and the factors of are such that or such that their product satisfy above relations.
Proof. Let a, n, m, r be natural integers with , n prime, .
The first part of this theorem is easily demonstrated, noting first from (
2.27) that one has
Searching for the congruence conditions for
in (
2.52), it yields
As the coefficient of
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
The exponent
n being an odd prime, it must be either
or
, yielding respectively from (
2.82)
Calculating the values of
and of
for the first eight values of
a,
, yields the series
,
,
,
,
,
,
,
, that repeats itself indefinitely for successive values of
, hence relations (
2.76) to (2.79) hold.
The second part of the theorem on the congruence of factors of is then obvious. □
The factorization of the first composites
is indicated in Tables 2 for
n primes,
. It is seen that all the factors
of composites
are of the form (
2.71) and are either
or
such as their products satisfy relations (
2.76) to (2.79).
Composite
can be written generally in function of their prime integer factors, from (
2.69) and (
2.71),
In the case of more than two prime integer factors and for exponents
, a composite
can also be written in all generality as the product of two factors not necessarily primes and with their exponents
, as any combination of products of factors
of the form (
2.71) will be of the same form (
2.71)
Therefore, a corollary of the above Theorem 7 is as follows.
Corollary 8.
For all natural integer bases and all prime integer exponents , a natural integer divides a if and only if the integer function associated to the is such that
for all factors and where are natural integers.
Proof. Let a, n, r be natural integers with , n prime, .
Relation (
2.87) obviously holds whether
is prime or composite. For two factors like in (
2.86), one has
yielding immediately (
2.87). If
is prime, then
and
Conversely, if the integer function
is such that (
2.87) holds with
, then it exists an integer
r such as
yielding
meaning that
divides
for an appropriate choice of the integer
r, which is here
in the second factor
of
. This relation (
2.87) is true whether the factors
and
are composites or primes of the form (
2.71). □
From Table 2, it is seen that the integers
,
, ...,
, ... 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
.
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, , then divides if and only if is a prime; in this case, if , then is composite. This means that for and prime, has the factor with , and that in this case is prime. This is exactly the case for and ; and ; and so on. This can be generalized for all for odd primes n, irrespective of n being congruent to or not, in the following theorem.
Theorem 9. For all natural integer bases and all prime integer exponents , a natural integer divides if and only if, for some natural integer values of , is prime or a composite formed by the product of primes of the form , with i and j natural integers.
Before demonstrating this theorem, it is important to realize that not all integer values of will do in Theorem 9, only those that render the factor prime or composite of the form will be acceptable. All other integer values of are excluded and are called excluded values. The following Lemma is demonstrated giving the form that factors cannot take and the form of excluded values of .
Lemma 10.
For all natural integer bases and all prime integer exponents , a natural integer divides a if and are different from excluded values, i.e. different respectively from either (i)
for positive natural integers , with u, v and r positive natural integers such as , ε and δ integers and and such as ; or (ii)
for positive natural integers k; or (iii)
for natural integers k, for odd natural integers t such that , for integers α, β, γ, with β and γ odd integers and .
Proof. Let a, n, i, j, k, , , s, u, v, x, y be natural integers with , n prime, , and , , , , , r integers and and .
From Theorem 6, factors
of a
are
Let’s assume in all generality that
can be written as
for yet unknown natural integers
x and
y. For a given prime
n, for
to be excluded values, (
2.93) must not be verified for all bases
a. Among all possible values of
, it will be the case if in (
2.93)
meaning that
is a multiple of y. Writing in all generality
and
, one has from (
2.94)
with
,
,
integers and
k and
s natural integers. Replacing in (
2.96) yields
or
which gives the condition
where
and
are obviously odd integers, either positive and/or negative depending on the sign of
. The factors
read then from (
2.95) and (
2.97) with (
2.100)
All
of the form (
2.97) are excluded values and all
of the form (
2.101) cannot be factors of
for every integers
,
,
complying with (
2.100) and for all natural integers
k, except for the following specific cases.
(i) First, for the triplet
verifying (
2.100),
(
2.97) and factors
(
2.101) read respectively
If for certain positive integers
k,
is prime, then by Theorem 6,
(
2.103) are factors of a
and
(
2.102) are not excluded values.
If for other positive integers
k,
is composite, it can be written as
with the obvious condition
where
u and
v are natural integers with
u and
v not simultaneously null;
,
and
r are integers with
and
; and
As
k must be a natural integer, only the values of
and
complying with (
2.105) must be considered. For
(i.e.,
),
and the factors of
are
showing that
(
2.102) with (
2.107) are not excluded values, similarly to the above case of
being prime.
For all the other cases of values of
k in (
2.106) with
and
integers
and
, and complying with (
2.105), the factors
from (
2.103) read
which, by Theorem 6, cannot be factors of a
and the corresponding
(
2.102) are excluded values. For example, with
(i.e.
), the factors of
are
, showing from (
2.103) that
cannot be factors of a
and that the corresponding
are excluded values.
(ii) Second, for the triplet
verifying (
2.100),
(
2.97) and factors
(
2.101) read respectively
showing again by Theorem 6 that
(
2.110) cannot be factors of a
and that
(
2.109) are excluded values for all positive integers
k.
(iii) Third, for the general case where
, from (
2.100), both
and
are obviously
and therefore again by Theorem 6,
(
2.101) cannot be factors of a
and all
(
2.97) are excluded values for all natural integers
k.
Summarizing, the excluded values of
and the excluded forms of factors
are respectively (
2.90) for positive integers
k (
2.106) with
and
integers
and
; (
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
, as, from the form of factors
(
2.101),
The excluded forms of factors
(
2.92) are always composites and the product of at least two factors, which are multiple of integers of the form
and/or
with
j natural integers and at least once
. □
Theorem 9 can now be demonstrated as follows.
Proof. Let be natural integers with , n prime, .
The first part of the demonstration is quite straightforward as from Theorem 6 above, all natural integer prime and composite factors of
are of the form (
2.71).
Conversely, if an natural integer
is prime or a composite formed by the product of primes of the form
, then, for a suitable choice of an integer
, a natural integer function
can be found and written as
The suitable choice of the integer
means here that it must not be an excluded value specifically for the prime exponent
n as shown in Lemma 10, i.e. that
must itself be either a prime or a composite formed by the product of primes of the form
. Relation (
2.112) then yields
and by the Corollary 8 above,
divides
, i.e. there is a base
a for which the integer function
in (
2.4) specific for each prime exponent
n is equal to
(
2.112). □
We emphasize that not all integer values of and will do and that the integer must be chosen suitably, such that the factors and are prime or composite formed by the product of primes of the form . All other values of and are excluded values as shown in Lemma 10.
2.4.3. Theorem on congruence of coefficients and
The form of the integers and in the factors and of composite can be determined in function of the exponent n, the base a and the factors and by the following theorem.
Theorem 11.
If a composite has and as two factors, then and with u and , 1, 2 or 3, depending on congruence of and on congruence of , as shown in Table 3.
Table 3.
Congruence of natural integers and .
Table 3.
Congruence of natural integers and .
For
|
|
|
if or
|
if or
|
if or
|
if or
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For
|
|
|
if or
|
if or
|
if or
|
if or
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The demonstration of this theorem is based on the above Theorems 7 and 9.
Proof. Let
be natural integers with
,
n prime,
and
integers. Let
and
be the two factors of
. From Theorem 9,
and
are primes of the form
and/or composites of the form of a product of integers
. From Theorem 7, one has
with
and
where
,
and
take values either
or
, with the obvious condition that
which then yields by Theorem 7
For
one has for
and
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 in Table 3), or , yielding that and are congruent to and/or for , and and are congruent to and/or for .
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
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
. 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 , 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 |
|
primes |
|
numbers |
primes |
|
#for
|
|
|
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 |
– |
– |
– |
– |
– |
If we compare the number of known Mersenne primes, 51, to first, the number of all the primes less than that can be approximated from the prime number theorem as , i.e. approximately , and second to the number of Mersenne numbers with prime exponents, i.e. the number of primes less than 82589933, i.e., , or approximately 4530590, we see that the density of Mersenne primes is extremely low, in the order of and 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 is used to define an elliptic curve.
- In the Carter-Wegman Counter (CWC) mode [
19], the Mersenne prime
is used to define a universal hash function consisting of evaluating a polynomial modulo the Mersenne prime
.
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 or 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 are even and divisible by n, a and for any odd prime exponent n and by for any prime exponent . The remaining factor is a function of triangular numbers of , 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 are divisible by 6, and more precisely are congruent to or depending on the congruence of the base ; second, that are divisible by 10 if and, if , , or or depending on the congruence of the base ; third, that all factors of are of the form with natural integers such that is prime itself or the product of primes of the form with j natural integer; fourth, that for odd prime exponents n, all are periodically congruent to either or depending on the congruence of the base ; and fifth, that the factors of a composite is of the form with and u being either 0, 1, 2 or 3 depending on the congruence of the exponent and on the congruence of the base . 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
- 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).
- Benjamin, A.T.; Quinn, J.J. Proofs that really count, Mathematical Association of America, 2003.
- 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.
- Caldwell, C.K. Available online: http://primes.utm.edu/mersenne/index.html#known (accessed on 10 January 2023).
- Chung, J.; Hasan, A. More Generalised Mersenne number, Report CORR 03-17, University of Waterloo, 2003.
- J.H. Conway, R.K. Guy, The book of Numbers, Springer-Verlag, New-York, 1996, 38-56.
- 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).
- Crandall, R.E. Method and apparatus for public key exchange in a cryptographic system, U.S. Patent # 5,159,632, 1992. [Google Scholar]
- 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).
- Angel, J.D.J.; Morales-Luna, G. Counting prime numbers with short binary signed representation, Available online: http://eprint.iacr.org/2006/121, 2006.
- 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).
- Dunlap, R.A. The Golden Ratio and Fibonacci Numbers, World Scientific Press, 1997.
- Great Internet Mersenne Prime Search GIMPS, Available online:. Available online: https://www.mersenne.org/primes/ (accessed on 10 January 2023).
- Hensley, D. personal communication via D. Huylebrouck. 20 October.
- V.E. Hoggatt Jr. Fibonacci and Lucas number, Houghton Mifflin, 1969.
- 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).
- 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).
- 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).
- 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]
- Koshy, T. Fibonacci and Lucas Numbers with Application, Wiley-Interscience, 2001.
- Lucas, E. Théorie des Fonctions Numériques simplement Périodiques, Am. J. Mathematics vol. 1, 1878, 184-240, 289-321.
- 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.
- Ribenboim, P. The book of prime number records, 2nd ed., Springer-Verlag, New-York, 1989, 75-81.
- 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]
- Schroeder, M.R. Number Theory in Science and Communication, 2nd ed., Springer-Verlag, Berlin, 1986, 72-73.
- Seibert, J. Fibonacci and Lucas Products Modulo A Prime, Solution Problem B-1037. Fibonacci Quarterly, Vol. 46-47, p. 88, 2008-2009.
- Sierpinski, W. Elementary Theory of Numbers, 2nd ed., Ed. S. Schinzel, Elsevier, Amsterdam, and PWN, Warsaw, 1988, 360-362.
- Sloane, N.J.A. The Online Encyclopedia of Integer Sequences. Available online: https://oeis.org/ (accessed on 5 February 2024).
- Solinas, J. Generalized Mersenne numbers, Technical Report CORR 99-39, University of Waterloo, 1999.
- Solinas, J. Cryptographic identification and digital signature method using efficient elliptic curve, U.S. Patent # 6,898,284, 2005. [Google Scholar]
- 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).
- 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).
- Vajda, S. Fibonacci and Lucas numbers, and the Golden Section: Theory and Applications, Halsted Press, 1989.
- 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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).