Generalized Mersenne Prime Number and Its Application to Random Number Generation

A Mersenne prime number is a prime number of the form 2k — 1. In this paper, we consider a Generalized Mersenne Prime (GMP) which is of the form R(k,p) = (p k -l)/(p - 1), where k,p and R(k,p) are prime numbers. For such a GMP, we then propose a much more efficient search algorithm for a special form of Multiple Recursive Generator (MRG) with the property of an extremely large period length and a high dimension of equidistribution. In particular, we find that (p k - l)/(p - 1) is a GMP, for k = 1511 and p = 2147427929. We then find a special form of MRG with order k = 1511 and modulus p = 2147427929 with the period length 1014100.5.Many other efficient and portable generators with various k ≤ 1511 are found and listed. Finally, for such a GMP and generator, we propose a simple and quick method of generating maximum period MRGs with the same order k. The readers are advised not to confuse GMP defined in this paper with other generalizations of the Mersenne Prime. For example, the term “Generalized Mersenne Number” (GMN) is used in Appendix 6.1 of FIPS-186-2, a publication by National Institute of Standards and Technology (NIST). In that document, GMN is a prime number that can be written as 2k ± 1 plus or minus a few terms of the form 2r.

[1]  Solomon W. Golomb,et al.  Shift Register Sequences , 1981 .

[2]  Lih-Yuan Deng,et al.  Random number generators for multiprocessor systems , 1994 .

[3]  J. Wrench Table errata: The art of computer programming, Vol. 2: Seminumerical algorithms (Addison-Wesley, Reading, Mass., 1969) by Donald E. Knuth , 1970 .

[4]  Pierre L'Ecuyer,et al.  Linear congruential generators of order K>1 , 1988, WSC '88.

[5]  Pierre L'Ecuyer,et al.  A search for good multiple recursive random number generators , 1993, TOMC.

[6]  Pierre L'Ecuyer,et al.  Good Parameters and Implementations for Combined Multiple Recursive Random Number Generators , 1999, Oper. Res..

[7]  Donald E. Knuth,et al.  The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .

[8]  Dennis K. J. Lin,et al.  Random Number Generation for the New Century , 2000 .

[9]  A. Grube,et al.  Mehrfach rekursiv‐erzeugte Pseudo‐Zufallszahlen , 1973 .

[10]  N. Zierler Linear Recurring Sequences , 1959 .

[11]  Weidong Kou Digital Signature Standards , 1997 .

[12]  Harald Niederreiter,et al.  Introduction to finite fields and their applications: List of Symbols , 1986 .

[13]  Lih-Yuan Deng,et al.  A system of high-dimensional, efficient, long-cycle and portable uniform random number generators , 2003, TOMC.

[14]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[15]  C. Pomerance,et al.  Prime Numbers: A Computational Perspective , 2002 .