×

Lucas-Lehmer primality tests for certain prime curios. (English) Zbl 1493.11156

The celebrated Lucas-Lehmer test it is a deterministic and very fast test to determine the primality of Mersenne numbers, numbers in the family \(\{M_n=2^n-1\}\) (or more generally numbers in the family \(\{A2^n-1\},\, A\) an odd number, \(A<2^n\)). The test is based on the properties of the Lucas sequences \(\{U_n\},\, \{V_n\}\) corresponding to the roots of a quadratic polynomial \(x^2-Px-Q,\, P,Q\in \mathbf{Z}\). The Lucas-Lehmer test has been generalized to many others families of numbers, see [H. C. Williams, Édouard Lucas and primality testing. New York, NY: John Wiley & Sons (1998; Zbl 1155.11363)].
Following these steps the present paper provides two Lucas-Lehmer-like algorithms to test the primality of numbers in the family \(\{N_d(n,m)=10^{2n+m} -d10^n -1\},\, m\) odd, \(d\) a number of \(m\) digits. The authors argue that those numbers are of interest in recreational mathematics, since they can be prime curios, see [J. N. Friend, Numbers: fun and facts. New York: Charles Scribner’s Sons (1954; Zbl 0059.00102)], primes with a peculiar shape (in base 10 representation), for instance palindrome numbers, numbers with shape \(99\cdots 9,g,99\cdots 9,g,99\cdots, 9\), etc.
Sections 2 and 3 recall the Lucas-Lehmer test and some more general class of tests based on linear recurrence sequences.

The first algorithm for numbers \(N_d(n,m)\) is given as Corollary 1 (of Theorem 5) in Section 4 while the second is given in Corollary 3 (of Theorem 12) and Corollary 4 (of Theorem 13) in Section 7. Both tests assume it is known a prime \(q,\, q\equiv 1 \bmod 5,\, N^{(q-1)/5} \neq 0,1 \bmod q\).

Finally Section 8 shows some computational results (Tables 1 to 12). Tables 1 and 2 give the smallest \(q\) verifying the above condition for \(N \in N_d(n,1)\) and \(3\le n \le 11000\). The rest of Tables give prime numbers and run time for some \(N\) in the families \(N_d(n,i),\, i=1,3,5,7,9\).

MSC:

11Y11 Primality
11A51 Factorization; primality

Software:

OEIS

References:

[1] E. Bach and J. Sorenson, Sieve algorithms for perfect power testing, Algorithmica 9 (1993), 313-328. · Zbl 0771.11049
[2] D. J. Bernstein, Detecting perfect powers in essentially linear time, Math. Comp. 67 (1998), 1253-1283. · Zbl 0910.11057
[3] Wieb Bosma, Explicit primality criteria for h • 2 k ± 1, Math. Comp. 61 (1993), 97-109. · Zbl 0817.11060
[4] John Brillhart, Note on representing a prime as a sum of two squares, Math. Comp. 26 (1972), 1011-1013. · Zbl 0259.10006
[5] Yingpu Deng and Dandan Huang, Explicit primality criteria for h • 2 n ± 1, J. Théor. Nombres Bordeaux 28 (2016), 55-74. · Zbl 1364.11014
[6] Chris K. Caldwell and G. L. Honaker, Prime Curios! The Dictionary of Prime Number Trivia, CreateSpace, 2009. Companion website: https://primes.utm.edu/curios/.
[7] Richard Crandall and Carl Pomerance, Prime Numbers A Computational Perspective, Springer-Verlag, New York, 2001. · Zbl 0995.11072
[8] Newton Friend, Numbers: Fun and Facts, Charles Scribner’s Sons, New York, 1954. · Zbl 0059.00102
[9] Great International Mersenne Prime Search. https://mersenne.org.
[10] David Harvey and Joris van der Hoeven, Integer multiplication in in time O(n log n). https: //hal.archives-ouvertes.fr/hal-02070778 · Zbl 1480.11162
[11] D. H. Lehmer, An extended theory of Lucas’ functions, Ann. of Math. 31 (1930), 419-448. · JFM 56.0874.04
[12] Bruce Pyne, Prime Recreations: An Olio of Curios about Prime Numbers, Page Publishing, New York, 2018.
[13] N. J. A. Sloane et al., The On-Line Encyclopedia of Integer Sequences, 2021. Available at https://oeis.org. · Zbl 1044.11108
[14] E. L. Roettger and H. C. Williams and R. K. Guy, Some primality tests that eluded Lucas, Des. Codes and Cryptog. 77 (2015), 515-539. · Zbl 1364.11161
[15] H. C. Williams, A class of primality tests for trinomials which include the Lucas-Lehmer test, Pacific J. Math. 98 (1982), 477-494. · Zbl 0482.10007
[16] H. C. Williams, Effective primality tests for some integers of the forms A5 n − 1 and A7 n − 1, Math. Comp. 48 (1987), 385-403. · Zbl 0608.10003
[17] H. C. Williams,Édouard Lucas and Primality Testing, Wiley-Interscience, 1998.
[18] H. C. Williams and R. K. Guy, Some fourth-order linear divisibility sequences, Int. J. Number Theory 7 (2011),1255-1277. · Zbl 1237.11006
[19] H. C. Williams and R. K. Guy, Odd and even linear divisibility sequences of order 4, Integers 15 (2015), A33. · Zbl 1336.11017
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.