Repunit
In recreational mathematics, a repunit is a number like 11, 111, or 1111 that contains only the digit 1 — a more specific type of repdigit. The term stands for repeated unit and was coined in 1966 by Albert H. Beiler in his book "Recreations in the Theory of Numbers". A repunit prime is a repunit that is also a prime number. Primes that are repunits in base-2 are Mersenne primes. As of March 2022, the largest known prime number , the largest probable prime "R" and the largest elliptic curve primality prime "R" are all repunits. Definition. The base-"b" repunits  are defined as (this "b" can be either positive or negative) Thus, the number "R" consists of "n" copies of the digit 1 in base-"b" representation. The first two repunits base-"b" for "n" = 1 and "n" = 2 are In particular, the "decimal (base-"10") repunits" that are often referred to as simply "repunits" are defined as Thus, the number "R" = "R" consists of "n" copies of the digit 1 in base 10 representation. The sequence of repunits base-10 starts with Similarly, the repunits base-2 are defined as Thus, the number "R" consists of "n" copies of the digit  1 in base-2 representation. In fact, the base-2 repunits are the well-known Mersenne numbers "M" = 2 − 1, they start with Factorization of decimal repunits. (Prime factors colored means "new factors", i. e. the prime factor divides "R" but does not divide "R" for all "k" < "n") Smallest prime factor of "R" for "n" > 1 are Repunit primes. The definition of repunits was motivated by recreational mathematicians looking for prime factors of such numbers. It is easy to show that if "n" is divisible by "a", then "R" is divisible by "R": where formula_6 is the  formula_7 cyclotomic polynomial and "d" ranges over the divisors of "n". For "p" prime, which has the expected form of a repunit when "x" is substituted with "b". For example, 9 is divisible by 3, and thus "R" is divisible by "R"—in fact, 111111111 = 111 · 1001001. The corresponding cyclotomic polynomials formula_9 and formula_10 are formula_11 and formula_12, respectively. Thus, for "R" to be prime, "n" must necessarily be prime, but it is not sufficient for "n" to be prime. For example, "R" = 111 = 3 · 37 is not prime. Except for this case of "R", "p" can only  divide "R" for prime "n" if "p" = 2"kn" + 1 for some "k". Decimal repunit primes. "R" is prime for "n" = 2, 19, 23, 317, 1031, 49081 ... (sequence in OEIS). "R" is probably prime. On April 3, 2007 Harvey Dubner (who also found "R") announced that "R" is a probable prime. On July 15, 2007, Maksym Voznyy announced "R" to be probably prime. Serge Batalov and Ryan Propper found "R" and "R" to be probable primes on April 20 and May 8, 2021, respectively. As of their discovery each was the largest known probable prime. On March 22 , 2022 probable prime "R" was eventually proven to be a prime. It has been conjectured that there are infinitely many repunit primes and they seem to occur roughly as often as the prime number theorem would predict: the exponent of the "N"th repunit prime is generally around a fixed multiple of the exponent of the ("N"−1)th. The prime repunits are a trivial subset of the permutable primes, i.e., primes that remain prime after any permutation of their digits. Particular properties are Base 2 repunit primes. Base-2 repunit primes are called Mersenne primes. Base 3 repunit primes. The first few base-3  repunit primes are corresponding to formula_13 of Base 4 repunit primes. The only base-4 repunit prime is 5 (formula_14). formula_15, and 3 always divides formula_16 when "n" is odd and formula_17 when "n" is even. For "n" greater than 2, both formula_16 and formula_17 are greater than 3, so removing the factor of 3 still leaves two factors greater than 1. Therefore, the number cannot be prime. Base 5 repunit primes. The first few base-5 repunit primes are corresponding to formula_13 of Base 6 repunit primes. The first few base-6 repunit primes are corresponding to formula_13 of Base 7  repunit primes. The first few base-7 repunit primes are corresponding to formula_13 of Base 8 repunit primes. The only base-8 repunit prime is 73 (formula_23). formula_24, and 7 divides formula_25 when "n" is not divisible by 3 and formula_17 when "n" is a multiple of 3. Base 9 repunit primes. There are no base-9 repunit primes. formula_27, and both formula_28 and formula_29 are even and greater than 4. Base 11 repunit primes. The first few base-11 repunit primes are corresponding to formula_13 of Base 12 repunit primes. The first few base-12 repunit primes are corresponding to formula_13 of Base 20  repunit primes. The first few base-20 repunit primes are corresponding to formula_13 of Bases "b" such that "R"(b) is prime for prime "p". Smallest base formula_33 such that formula_34 is prime (where formula_35 is the formula_13th prime) are Smallest base formula_33 such that formula_38 is prime (where formula_35 is the formula_13th prime) are List of repunit primes base "b". Smallest prime formula_41 such that formula_34 is prime are (start with formula_43, 0 if no such formula_35 exists) Smallest prime formula_41 such that formula_38 is prime are (start with formula_43, 0 if no such formula_35 exists, question mark if this term  is currently unknown) For more information, see. Algebra factorization of generalized repunit numbers. If "b" is a perfect power (can be written as "m", with "m", "n" integers, "n" > 1) differs from 1, then there is at most one repunit in base-"b". If "n" is a prime power (can be written as "p", with "p" prime, "r" integer, "p", "r" >0), then all repunit in base-"b" are not prime aside from "R" and "R". "R" can be either prime or composite, the former examples, "b" = −216, −128, 4, 8, 16, 27, 36, 100, 128, 256, etc., the  latter examples, "b" = −243, −125, −64, −32, −27, −8, 9, 25, 32, 49, 81, 121, 125, 144, 169, 196, 216, 225, 243, 289, etc., and "R" can be prime (when "p" differs from 2) only if "b" is negative, a power of −2, for example, "b" = −8, −32, −128, −8192, etc., in fact, the "R" can also be composite, for example, "b" = −512, −2048, −32768, etc. If "n" is not a prime power, then no base-"b" repunit prime exists, for example, "b" = 64, 729 (with "n" = 6), "b" = 1024 (with "n" = 10), and  b = −1 or 0 (with "n" any natural number). Another special situation is "b" = −4"k", with "k" positive integer, which has the aurifeuillean factorization, for example, "b" = −4 (with "k" = 1, then "R" and "R" are primes), and "b" = −64, −324, −1024, −2500, −5184, ... (with "k" = 2, 3, 4, 5, 6, ...), then no base-"b" repunit prime exists. It is also conjectured that when "b" is neither a perfect power nor −4"k" with "k" positive integer, then there are infinity many base-"b" repunit primes. The generalized repunit conjecture. A conjecture related to the generalized repunit  primes: (the conjecture predicts where is the next generalized Mersenne prime, if the conjecture is true, then there are infinitely many repunit primes for all bases formula_33) For any integer formula_33, which satisfies the conditions: has generalized repunit primes of the form for prime formula_35, the prime numbers will be distributed near the best fit line where limit formula_65, formula_66 and there are about base-"b" repunit primes less than "N". We also have the following 3 properties: History. Although they were not then known by that name, repunits in base-10 were studied by many mathematicians during the nineteenth century in  an effort to work out and predict the cyclic patterns of repeating decimals. It was found very early on that for any prime "p" greater than 5, the period of the decimal expansion of 1/"p" is equal to the length of the smallest repunit number that is divisible by "p". Tables of the period of reciprocal of primes up to 60,000 had been published by 1860 and permitted the factorization by such mathematicians as Reuschle of all repunits up to "R" and many larger ones. By 1880, even "R" to "R" had been factored and it is curious that, though  Édouard Lucas showed no prime below three million had period nineteen, there was no attempt to test any repunit for primality until early in the twentieth century. The American mathematician Oscar Hoppe proved "R" to be prime in 1916 and Lehmer and Kraitchik independently found "R" to be prime in 1929. Further advances in the study of repunits did not occur until the 1960s, when computers allowed many new factors of repunits to be found and the gaps in earlier tables of prime periods corrected. "R" was found to be a probable prime circa 1966 and was proved prime eleven  years later, when "R" was shown to be the only further possible prime repunit with fewer than ten thousand digits. It was proven prime in 1986, but searches for further prime repunits in the following decade consistently failed. However, there was a major side-development in the field of generalized repunits, which produced a large number of new primes and probable primes. Since 1999, four further probably prime repunits have been found, but it is unlikely that any of them will be proven prime in the foreseeable future because of their huge size. The Cunningham project endeavours to document the  integer factorizations of (among other numbers) the repunits to base 2, 3, 5, 6, 7, 10, 11, and 12. Demlo numbers. D. R. Kaprekar has defined Demlo numbers as concatenation of a left, middle and right part, where the left and right part must be of the same length (up to a possible leading zero to the left) and must add up to a repdigit number, and the middle part may contain any additional number of this repeated digit. They are named after Demlo railway station (now called Dombivili) 30 miles from Bombay on the then G.I.P. Railway, where Kaprekar  started investigating them. He calls "Wonderful Demlo numbers" those of the form 1, 121, 12321, 1234321, ..., 12345678987654321. The fact that these are the squares of the repunits has led some authors to call Demlo numbers the infinite sequence of these, 1, 121, 12321, ..., 12345678987654321, 1234567900987654321, 123456790120987654321, ..., , although one can check these are not Demlo numbers for "p" = 10, 19, 28, ...