TOPICS
Search

Repunit Prime


A repunit prime is a repunit (i.e., a number consisting of copies of the single digit 1) that is also a prime number.

The base-10 repunit primes and probable primes R_n=(10^n-1)/9 occur for n=2, 19, 23, 317, 1031, 49081, 86453, 109297, 270343, ... (OEIS A004023; Madachy 1979, Williams and Dubner 1986, Ball and Coxeter 1987, Granlund, Dubner 1999, Baxter 2000).

T. Granlund completed a search for probable primes up to 45000 in 1998 using two months of CPU time on a parallel computer. The search was extended by Dubner (1999), culminating in the discovery of the probable prime R_(49081). A number of larger repunit probable primes have since been found, as summarized in the following table. As of July 1, 2021, all numbers up to n=10800000 have been searched (OEIS A004023).

ndiscoverer(s)datestatus
2proven prime
19proven prime
23proven prime
317proven prime
1031proven prime (Williams and Dubner 1986)
49081H. Dubner (1999, 2002)Sep. 9, 1999proven prime (Underwood 2022)
86453L. Baxter (2000)Oct. 26, 2000proven prime (PrimePages 2023, Enge 2024)
109297P.  Bourdelais (2007), H. Dubner (2007)Mar. 26-28, 2007proven prime (PrimePages 2025, Enge 2026)
270343M. Voznyy and A. Budnyy (2007)Jul. 11, 2007probable prime
5794777S. Batalov and R. PropperApr. 20, 2021probable prime
8177207S. Batalov and R. PropperMay 8, 2021probable prime

R_(1031) was the largest proven base-10 repunit prime (Williams and Dubner 1986) until 2022, when P. Underwood proved R_(49081) to be prime using elliptic curve primality proving. The certification took 20 months on an AMD 3990x computer with 64 cores, and verification took about 13 hours (Underwood 2022). A. Enge proved R_(86453) to be prime in May 2023, and Enge and P. Underwood proved R_(109297) to be prime in May 2025 using elliptic curve primality proving (PrimePages 2023, PrimePages 2025, Enge 2026). The latter is the largest proven repunit prime.

Every base-10 repunit prime is a circular prime.

The least positive integer values of k such that (n^k-1)/(n-1) is prime for n=2, 3, ... are 2, 3, 2, 3, 2, 5, 3, 0, 2, 17, 2, 5, ... (OEIS A084740), and the least values of k such that (n^k+1)/(n+1) is prime for n=2, 3, ... are 3, 3, 3, 5, 3, 3, 0, 3, 5, 5, 5, 3, ... (OEIS A084742). In both sequences, 0 indicates that no such exponent exists.

Williams and Seah (1979) tabulated prime and probable prime generalized repunits for 3<=b<=12 and 2<=n<=1000. A (base-10) repunit can be prime only if n is prime, since for n=ab with integers a,b>1, 10^(ab)-1 is a binomial number which can be factored algebraically. In fact, if n=2a is even, then 10^(2a)-1=(10^a-1)(10^a+1). As with positive bases, all the exponents of prime repunits with negative bases are odd primes.

bOEISn of prime or probable-prime b-repunits
-12A0571785, 11, 109, 193, 1483, ...
-11A0571775, 7, 179, 229, 439, 557, 6113, ...
-10A0015625, 7, 19, 31, 53, 67, 293, ...
-9A0571753, 59, 223, 547, 773, 1009, 1823, ...
-7A0571733, 17, 23, 29, 47, 61, 1619, ...
-6A0571723, 11, 31, 43, 47, 59, 107, ...
-5A0571715, 67, 101, 103, 229, 347, 4013, ...
-3A0076583, 5, 7, 13, 23, 43, 281, ...
-2A0009783, 5, 7, 11, 13, 17, 19, ...
2A0000432, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, ...
3A0284913, 7, 13, 71, 103, 541, 1091, 1367, ...
5A0040613, 7, 11, 13, 47, 127, 149, 181, 619, ...
6A0040622, 3, 7, 29, 71, 127, 271, 509, 1049, ...
7A0040635, 13, 131, 149, 1699, ...
10A0040232, 19, 23, 317, 1031, ...
11A00580817, 19, 73, 139, 907, 1907, 2029, 4801, ...
12A0040642, 3, 5, 19, 97, 109, 317, 353, 701, ...

Yates (1982) published all the repunit factors for n<=1000. Brillhart et al. (1988) gave a table of repunit factors which cannot be obtained algebraically, and a continuously updated version of this table is now maintained online. These tables include factors for 10^n-1 (with n odd) and 10^n+1 (with n even and odd). After algebraically factoring R_n, these types of factors are sufficient for complete factorizations.

A Smith number can be constructed from a complete prime factorization of any base-10 repunit (McDaniel 1987, pp. 76-78).


See also

Circular Prime, Integer Sequence Primes, Prime Number, Repunit

Explore with Wolfram|Alpha

References

Ball, W. W. R. and Coxeter, H. S. M. Mathematical Recreations and Essays, 13th ed. New York: Dover, p. 66, 1987.Batalov, S. May 9, 2021. https://www.mersenneforum.org/node/20483/page2#post782828.Batalov, S. May 9, 2021. https://www.mersenneforum.org/node/20483/page2#post782867.Baxter, L. "R86453 Is a New Probable Prime Repunit." 26 Oct 2000. https://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind0010&L=nmbrthry&P=2557.Di Maria, G. "The Repunit Primes Project." https://repunit.org/.Dubner, H. "Generalized Repunit Primes." Math. Comput. 61, 927-930, 1993.Dubner, H. "New prp Repunit R(49081)." 9 Sep 1999. https://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind9909&L=nmbrthry&P=740.Dubner, H. "Repunit R49081 is a Probable Prime." Math. Comput. 71, 833-835, 2002. https://doi.org/10.1090/S0025-5718-01-01319-9.Dubner, H. "New Repunit R(109297)." 3 Apr 2007. https://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind0704&L=nmbrthry&T=0&P=178.Dubner, H. and Granlund, T. "Primes of the Form (b^n+1)/(b+1)." J. Int. Sequences 3, No. 00.2.7, 2000. https://cs.uwaterloo.ca/journals/JIS/VOL3/DUBNER/dubner.html.Enge, A. "FastECPP over MPI." In Proc. Mathematical Software-ICMS 2024 (Ed. K. Buzzard, A. Dickenstein, B. Eick, A. Leykin, and Y. Ren). Cham, Switzerland: Springer, pp. 36-45, 2024. https://doi.org/10.1007/978-3-031-64529-7_4.Enge, A. "Primality Record with ECPP--109297 Digits." Feb. 11, 2026. https://enge.math.u-bordeaux.fr/blog/ecpp-109297.html.Guy, R. K. "Mersenne Primes. Repunits. Fermat Numbers. Primes of Shape k·2^n+2." §A3 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 8-13, 1994.Lifchitz, H. and Lifchitz, R. "PRP Top Records: Search for (10^n-1)/9." http://www.primenumbers.net/prptop/searchform.php?form=%2810%5En-1%29%2F9&action=Search.McDaniel, W. L. "The Existence of Infinitely Many k-Smith Numbers." Fib. Quart. 25, 76-80, 1987. https://www.fq.math.ca/Scanned/25-1/mcdaniel.pdf.PrimePages. "R(86453)." May 15, 2023. https://t5k.org/primes/page.php?id=136044.PrimePages. "R(109297)." May 26, 2025. https://t5k.org/primes/page.php?id=140799.Sloane, N. J. A. Sequences A000043/M0672, A000225/M2655, A000978, A001562, A002275, A002450/M3914, A002452/M4733, A002477/M5386, A003462/M3463, A003463/M4209, A003464/M4425, A004023/M2114, A004061/M2620, A004062/M0861, A004063/M3836, A004064/M0744, A005808/M5032, A007583, A007658, A016123, A016125, A023000, A023001, A028491/M2643, A046053, A057171, A057172, A057173, A057175, A057177, A057178, A066443, A084740, and A084742 in "The On-Line Encyclopedia of Integer Sequences."Snyder, W. M. "Factoring Repunits." Am. Math. Monthly 89, 462-466, 1982.Sorli, R. "Factorization Tables." http://www-staff.maths.uts.edu.au/~rons/fact/fact.htm.Underwood, P. "R49081 is Prime!" Mar. 21, 2022. https://www.mersenneforum.org/node/14588/page2#post815645.Voznyy, M. and Budnyy, A. "New PRP Repunit R(270343)." 15 Jul 2007. https://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind0707&L=nmbrthry&T=0&P=1086.Williams, H. C. and Dubner, H. "The Primality of R1031." Math. Comput. 47, 703-711, 1986.Williams, H. C. and Seah, E. "Some Primes of the Form (a^n-1)/(a-1)." Math. Comput. 33, 1337-1342, 1979.Yates, S. "Prime Divisors of Repunits." J. Recr. Math. 8, 33-38, 1975.Yates, S. Repunits and Reptends. Delray Beach, FL: S. Yates, 1982.

Referenced on Wolfram|Alpha

Repunit Prime

Cite this as:

Weisstein, Eric W. "Repunit Prime." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/RepunitPrime.html

Subject classifications