Samiksha Jaiswal (Editor)

Repunit

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
No. of known terms
  
9

Largest known term
  
(10-1)/9

Conjectured no. of terms
  
Infinite

OEIS index
  
A004022

First terms
  
11, 1111111111111111111, 11111111111111111111111

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.

Contents

A repunit prime is a repunit that is also a prime number. Primes that are repunits in base 2 are Mersenne primes.

Definition

The base-b repunits are defined as (this b can be either positive or negative)

R n ( b ) b n 1 b 1 for  | b | 2 , n 1.

Thus, the number Rn(b) 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

R 1 ( b ) = b 1 b 1 = 1 and R 2 ( b ) = b 2 1 b 1 = b + 1 for   | b | 2.

In particular, the decimal (base-10) repunits that are often referred to as simply repunits are defined as

R n R n ( 10 ) = 10 n 1 10 1 = 10 n 1 9 for  n 1.

Thus, the number Rn = Rn(10) consists of n copies of the digit 1 in base 10 representation. The sequence of repunits base 10 starts with

1, 11, 111, 1111, 11111, 111111, ... (sequence A002275 in the OEIS).

Similarly, the repunits base 2 are defined as

R n ( 2 ) = 2 n 1 2 1 = 2 n 1 for  n 1.

Thus, the number Rn(2) consists of n copies of the digit 1 in base 2 representation. In fact, the base-2 repunits are the well-known Mersenne numbers Mn = 2n − 1, they start with

1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, ... (sequence A000225 in the OEIS).

Properties

  • Any repunit in any base having a composite number of digits is necessarily composite. Only repunits (in any base) having a prime number of digits might be prime. This is a necessary but not sufficient condition. For example,
  • since 35 = 7 × 5 = 5 × 7. This repunit factorization does not depend on the base b in which the repunit is expressed.
  • Any positive multiple of the repunit Rn(b) contains at least n nonzero digits in base b.
  • The only known numbers that are repunits with at least 3 digits in more than one base simultaneously are 31 (111 in base 5, 11111 in base 2) and 8191 (111 in base 90, 1111111111111 in base 2). The Goormaghtigh conjecture says there are only these two cases.
  • Using the pigeon-hole principle it can be easily shown that for each n and b such that n and b are relatively prime there exists a repunit in base b that is a multiple of n. To see this consider repunits R1(b),...,Rn(b). Assume none of the Rk(b) is divisible by n. Because there are n repunits but only n-1 non-zero residues modulo n there exist two repunits Ri(b) and Rj(b) with 1≤i<jn such that Ri(b) and Rj(b) have the same residue modulo n. It follows that Rj(b) - Ri(b) has residue 0 modulo n, i.e. is divisible by n. Rj(b) - Ri(b) consists of j - i ones followed by i zeroes. Thus, Rj(b) - Ri(b) = Rj-i(b) x bi . Since n divides the left-hand side it also divides the right-hand side and since n and b are relatively prime n must divide Rj-i(b) contradicting the original assumption.
  • The Feit–Thompson conjecture is that Rq(p) never divides Rp(q) for two distinct primes p and q.
  • Using the Euclidean Algorithm for repunits definition: R1(b) = 1; Rn(b) = Rn-1(b) x b + 1, any consecutive repunits Rn-1(b) and Rn(b) are relatively prime in any base b for any n.
  • If m and n are relatively prime, Rm(b) and Rn(b) are relatively prime in any base b for any m and n. The Euclidean Algorithm is based on gcd(m, n) = gcd(m - n, n) for m > n. Similarly, using Rm(b) - Rn(b) × bm-n = Rm-n(b), it can be easily shown that gcd(Rm(b), Rn(b)) = gcd(Rm-n(b), Rn(b)) for m > n. Therefore if gcd(m, n) = 1, then gcd(Rm(b), Rn(b)) = R1(b) = 1.
  • The remainder of Rn(10) modulo 3 is equal to the remainder of n modulo 3. Using 10a ≡ 1 (mod 3) for any a ≥ 0,
    n ≡ 0 (mod 3) ⇔ Rn(10) ≡ 0 (mod 3) ⇔ Rn(10) ≡ 0 (mod R3(10)),
    n ≡ 1 (mod 3) ⇔ Rn(10) ≡ 1 (mod 3) ⇔ Rn(10)R1(10) ≡ 1 (mod R3(10)),
    n ≡ 2 (mod 3) ⇔ Rn(10) ≡ 2 (mod 3) ⇔ Rn(10)R2(10) ≡ 11 (mod R3(10)).
    Therefore, 3 | n ⇔ 3 | Rn(10)R3(10) | Rn(10).
  • The remainder of Rn(10) modulo 9 is equal to the remainder of n modulo 9. Using 10a ≡ 1 (mod 9) for any a ≥ 0,
    nr (mod 9) ⇔ Rn(10)r (mod 9) ⇔ Rn(10)Rr(10) (mod R9(10)),
    for 0 ≤ r < 9.
    Therefore, 9 | n ⇔ 9 | Rn(10)R9(10) | Rn(10).
  • Factorization of decimal repunits

    (Prime factors colored red means "new factors", i. e. the prime factor divides Rn but not divides Rk for all k < n) (sequence A102380 in the OEIS)

    Smallest prime factor of Rn are

    1, 11, 3, 11, 41, 3, 239, 11, 3, 11, 21649, 3, 53, 11, 3, 11, 2071723, 3, 1111111111111111111, 11, 3, 11, 11111111111111111111111, 3, 41, 11, 3, 11, 3191, 3, 2791, 11, 3, 11, 41, 3, 2028119, 11, 3, 11, 83, 3, 173, 11, 3, 11, 35121409, 3, 239, 11, ... (sequence A067063 in the OEIS)

    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 Rn(b) is divisible by Ra(b):

    R n ( b ) = 1 b 1 d | n Φ d ( b ) ,

    where Φ d ( x ) is the d t h cyclotomic polynomial and d ranges over the divisors of n. For p prime,

    Φ p ( x ) = i = 0 p 1 x i ,

    which has the expected form of a repunit when x is substituted with b.

    For example, 9 is divisible by 3, and thus R9 is divisible by R3—in fact, 111111111 = 111 · 1001001. The corresponding cyclotomic polynomials Φ 3 ( x ) and Φ 9 ( x ) are x 2 + x + 1 and x 6 + x 3 + 1 , respectively. Thus, for Rn to be prime, n must necessarily be prime, but it is not sufficient for n to be prime. For example, R3 = 111 = 3 · 37 is not prime. Except for this case of R3, p can only divide Rn for prime n if p = 2kn + 1 for some k.

    Decimal repunit primes

    Rn is prime for n = 2, 19, 23, 317, 1031, ... (sequence A004023 in OEIS). R49081 and R86453 are probably prime. On April 3, 2007 Harvey Dubner (who also found R49081) announced that R109297 is a probable prime. He later announced there are no others from R86453 to R200000. On July 15, 2007 Maksym Voznyy announced R270343 to be probably prime, along with his intent to search to 400000. As of November 2012, all further candidates up to R2500000 have been tested, but no new probable primes have been found so far.

    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 Nth 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.

    Base 2 repunit primes

    Base 2 repunit primes are called Mersenne primes.

    Base 3 repunit primes

    The first few base 3 repunit primes are

    13, 1093, 797161, 3754733257489862401973357979128773, 6957596529882152968992225251835887181478451547013 (sequence A076481 in the OEIS),

    corresponding to n of

    3, 7, 13, 71, 103, 541, 1091, 1367, 1627, 4177, 9011, 9551, ... (sequence A028491 in the OEIS).

    Base 4 repunit primes

    The only base 4 repunit prime is 5 ( 11 4 ). 4 n 1 = ( 2 n + 1 ) ( 2 n 1 ) , and 3 always divides 2 n + 1 when n is odd and 2 n 1 when n is even. For n greater than 2, both 2 n + 1 and 2 n 1 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

    31, 19531, 12207031, 305175781, 177635683940025046467781066894531, 14693679385278593849609206715278070972733319459651094018859396328480215743184089660644531, 35032461608120426773093239582247903282006548546912894293926707097244777067146515037165954709053039550781, 815663058499815565838786763657068444462645532258620818469829556933715405574685778402862015856733535201783524826169013977050781 (sequence A086122 in the OEIS),

    corresponding to n of

    3, 7, 11, 13, 47, 127, 149, 181, 619, 929, 3407, ... (sequence A004061 in the OEIS).

    Base 6 repunit primes

    The first few base 6 repunit primes are

    7, 43, 55987, 7369130657357778596659, 3546245297457217493590449191748546458005595187661976371, 133733063818254349335501779590081460423013416258060407531857720755181857441961908284738707408499507 (sequence A165210 in the OEIS),

    corresponding to n of

    2, 3, 7, 29, 71, 127, 271, 509, 1049, 6389, 6883, ... (sequence A004062 in the OEIS).

    Base 7 repunit primes

    The first few base 7 repunit primes are

    2801, 16148168401, 85053461164796801949539541639542805770666392330682673302530819774105141531698707146930307290253537320447270457,
    138502212710103408700774381033135503926663324993317631729227790657325163310341833227775945426052637092067324133850503035623601

    corresponding to n of

    5, 13, 131, 149, 1699, ... (sequence A004063 in the OEIS).

    Base 8 repunit primes

    The only base 8 repunit prime is 73 ( 111 8 ). 8 n 1 = ( 4 n + 2 n + 1 ) ( 2 n 1 ) , and 7 divides 4 n + 2 n + 1 when n is not divisible by 3 and 2 n 1 when n is a multiple of 3.

    Base 9 repunit primes

    There are no base 9 repunit primes. 9 n 1 = ( 3 n + 1 ) ( 3 n 1 ) , and 2 always divides both 3 n + 1 and 3 n 1 .

    Base 11 repunit primes

    The first few base 11 repunit primes are

    50544702849929377, 6115909044841454629, 1051153199500053598403188407217590190707671147285551702341089650185945215953, 567000232521795739625828281267171344486805385881217575081149660163046217465544573355710592079769932651989153833612198334843467861091902034340949

    corresponding to n of

    17, 19, 73, 139, 907, 1907, 2029, 4801, 5153, 10867, ... (sequence A005808 in the OEIS).

    Base 12 repunit primes

    The first few base 12 repunit primes are

    13, 157, 22621, 29043636306420266077, 435700623537534460534556100566709740005056966111842089407838902783209959981593077811330507328327968191581, 388475052482842970801320278964160171426121951256610654799120070705613530182445862582590623785872890159937874339918941

    corresponding to n of

    2, 3, 5, 19, 97, 109, 317, 353, 701, 9739, ... (sequence A004064 in the OEIS).

    Base 20 repunit primes

    The first few base 20 repunit primes are

    421, 10778947368421, 689852631578947368421

    corresponding to n of

    3, 11, 17, 1487, ... (sequence A127995 in the OEIS).

    Bases b {\displaystyle b} such that R p ( b ) {\displaystyle R_{p}(b)} is prime for prime p {\displaystyle p}

    Smallest base b such that R p ( b ) is prime (where p is the n th prime) are

    2, 2, 2, 2, 5, 2, 2, 2, 10, 6, 2, 61, 14, 15, 5, 24, 19, 2, 46, 3, 11, 22, 41, 2, 12, 22, 3, 2, 12, 86, 2, 7, 13, 11, 5, 29, 56, 30, 44, 60, 304, 5, 74, 118, 33, 156, 46, 183, 72, 606, 602, 223, 115, 37, 52, 104, 41, 6, 338, 217, 13, 136, 220, 162, 35, 10, 218, 19, 26, 39, 12, 22, 67, 120, 195, 48, 54, 463, 38, 41, 17, 808, 404, 46, 76, 793, 38, 28, 215, 37, 236, 59, 15, 514, 260, 498, 6, 2, 95, 3, ... (sequence A066180 in the OEIS)

    Smallest base b such that R p ( b ) is prime (where p is the n th prime) are

    3, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 16, 61, 2, 6, 10, 6, 2, 5, 46, 18, 2, 49, 16, 70, 2, 5, 6, 12, 92, 2, 48, 89, 30, 16, 147, 19, 19, 2, 16, 11, 289, 2, 12, 52, 2, 66, 9, 22, 5, 489, 69, 137, 16, 36, 96, 76, 117, 26, 3, 159, 10, 16, 209, 2, 16, 23, 273, 2, 460, 22, 3, 36, 28, 329, 43, 69, 86, 271, 396, 28, 83, 302, 209, 11, 300, 159, 79, 31, 331, 52, 176, 3, 28, 217, 14, 410, 252, 718, 164, ... (sequence A103795 in the OEIS)

    List of repunit primes base b {\displaystyle b}

    Smallest prime p > 2 such that R p ( b ) is prime are (start with b = 2 , 0 if no such p exists)

    3, 3, 0, 3, 3, 5, 3, 0, 19, 17, 3, 5, 3, 3, 0, 3, 25667, 19, 3, 3, 5, 5, 3, 0, 7, 3, 5, 5, 5, 7, 0, 3, 13, 313, 0, 13, 3, 349, 5, 3, 1319, 5, 5, 19, 7, 127, 19, 0, 3, 4229, 103, 11, 3, 17, 7, 3, 41, 3, 7, 7, 3, 5, 0, 19, 3, 19, 5, 3, 29, 3, 7, 5, 5, 3, 41, 3, 3, 5, 3, 0, 23, 5, 17, 5, 11, 7, 61, 3, 3, 4421, 439, 7, 5, 7, 3343, 17, 13, 3, 0, ... (sequence A128164 in the OEIS)

    Smallest prime p > 2 such that R p ( b ) is prime are (start with b = 2 , 0 if no such p exists, question mark if this term is currently unknown)

    3, 3, 3, 5, 3, 3, 0, 3, 5, 5, 5, 3, 7, 3, 3, 7, 3, 17, 5, 3, 3, 11, 7, 3, 11, 0, 3, 7, 139, 109, 0, 5, 3, 11, 31, 5, 5, 3, 53, 17, 3, 5, 7, 103, 7, 5, 5, 7, 1153, 3, 7, 21943, 7, 3, 37, 53, 3, 17, 3, 7, 11, 3, 0, 19, 7, 3, 757, 11, 3, 5, 3, 7, 13, 5, 3, 37, 3, 3, 5, 3, 293, 19, 7, 167, 7, 7, 709, 13, 3, 3, 37, 89, 71, 43, 37, ?, 19, 7, 3, ... (sequence A084742 in the OEIS)

    * Repunits with negative base and even n are negative. If their absolute value is prime then they are included above and marked with an asterisk. They are not included in the corresponding OEIS sequences.

    For more information, see.

    Algebra factorization of generalized repunit numbers

    If b is a perfect power (can be written as mn, 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 pr, with p prime, r integer, p, r >0), then all repunit in base b are not prime aside from Rp and R2. Rp 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 R2 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 R2 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 = −4k4, with k positive integer, which has the aurifeuillean factorization, for example, b = −4 (with k = 1, then R2 and R3 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 −4k4 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 b )

    For any integer b , which satisfies the conditions:

    1. | b | > 1 .
    2. b is not a perfect power. (since when b is a perfect r th power, it can be shown that there is at most one n value such that b n 1 b 1 is prime, and this n value is r itself or a root of r )
    3. b is not in the form 4 k 4 . (if so, then the number has aurifeuillean factorization)

    has generalized repunit primes of the form

    R p ( b ) = b p 1 b 1

    for prime p , the prime numbers will be distributed near the best fit line

    Y = G log | b | ( log | b | ( R ( b ) ( n ) ) ) + C ,

    where limit n , G = 1 e γ = 0.561459483566...

    and there are about

    ( log e ( N ) + m log e ( 2 ) log e ( log e ( N ) ) + 1 N δ ) e γ log e ( | b | )

    base b repunit primes less than N .

  • e is the base of natural logarithm.
  • γ is Euler–Mascheroni constant.
  • log | b | is the logarithm in base | b |
  • R ( b ) ( n ) is the n th generalized repunit prime in base b (with prime p )
  • C is a data fit constant which varies with b .
  • δ = 1 if b > 0 , δ = 1.6 if b < 0 .
  • m is the largest natural number such that b is a 2 m 1 th power.
  • We also have the following 3 properties:

    1. The number of prime numbers of the form b n 1 b 1 (with prime p ) less than or equal to n is about e γ log | b | ( log | b | ( n ) ) .
    2. The expected number of prime numbers of the form b n 1 b 1 with prime p between n and | b | n is about e γ .
    3. The probability that number of the form b n 1 b 1 is prime (for prime p ) is about e γ p log e ( | b | ) .

    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 R16 and many larger ones. By 1880, even R17 to R36 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 R19 to be prime in 1916 and Lehmer and Kraitchik independently found R23 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. R317 was found to be a probable prime circa 1966 and was proved prime eleven years later, when R1031 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

    The Demlo numbers 1, 121, 12321, 1234321, ..., 12345678987654321, 1234567900987654321, 123456790120987654321, ..., (sequence A002477 in the OEIS) were defined by D. R. Kaprekar as the squares of the repunits, resolving the uncertainty how to continue beyond the highest digit (9), and named after Demlo railway station 30 miles from Bombay on the then G.I.P. Railway, where he thought of investigating them.

    References

    Repunit Wikipedia


    Similar Topics