FANDOM


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.

repunit prime is a repunit that is also a prime number.

In the sections below, Rn is the repunit with length n, e.g. R10 = 111111111111.

Repunit prime Edit

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)}=\frac{1}{b-1}\prod_{d|n}\Phi_d(b), $

where

$ \Phi_d(x) $ is the

$ d^\mathrm{th} $ cyclotomic polynomial and d ranges over the divisors of n. For p prime,

$ \Phi_p(x)=\sum_{i=0}^{p-1}x^i, $

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

For example, 10 is divisible by 2, 3, 4, and 6, thus R10 is divisible by R2, R3, R4, and R6, in fact, 111111111111 = 11 · 10101010101 = 111 · 1001001001 = 1111 · 100010001 = 111111 · 1000001, the corresponding cyclotomic polynomials

$ \Phi_2(x) $ and

$ \Phi_3(x) $ and

$ \Phi_4(x) $ and

$ \Phi_6(x) $ and

$ \Phi_{10}(x) $ are

$ x+1 $ and

$ x^2+x+1 $ and

$ x^2+1 $ and

$ x^2-x+1 $ and

$ x^4-x^2+1 $

, respectively (the algebraic factors of R10 = 111111111111 is 11 · E1 · 101 · 111 · EE01). Thus, for Rn to be prime, n must necessarily be prime, but it is not sufficient for n to be prime. For example, R7 = 1111111 = 46E · 2X3E is not prime. Except for the case of RE = 11111111111 = E · 1E · 754E2E41, p can only divide Rn for prime n if p = 2kn + 1 for some k.

Rn is known to be prime for n = 2, 3, 5, 17, 81, 91, 225, 255, 4X5, and Rn is probable prime for n = 5777, 879E, 198E1, 23175, 311407. (Note that 879E is the only known such n ends with E)

RXE/19E is a X8-digit prime (XE is the only known prime p such that Rp/(2p+1) is prime).

The largest two prime factors of R141 both have 60 digits, and these two prime factors are very close.

If n is composite, then Rn is also composite (e.g. 2E = 5 × 7, and R2E = 11111111111111111111111111111111111 = 11111 × 1000010000100001000010000100001 = 1111111 × 10000001000000100000010000001), however, when n is prime, Rn may not be prime, the first example is n=7, although 7 is prime, R7 = 1111111 is not prime, it equals 46E × 2X3E.

Theorem Edit

If p is prime other than E, then every prime factor of Rp is = 1 mod p. (e.g. R7 = 46E × 2X3E, and both 46E and 2X3E are = 1 mod 7)

If p is Sophie Germain prime other than 2, 3 and 5, then Rp is composite, since Rp must be divisible by 2p+1. (e.g. 1E|RE, 3E|R1E, 4E|R25, 6E|R35, 8E|R45, 11E|R6E, 12E|R75, 16E|R95, 19E|RXE) (by the way, R2, R3 and R5 are all primes)

If p is prime other than 2, 3 and E, then p divides Rp-1, however, some composite numbers c also divide Rc−1, the first such example is 55, which divides R54, such composites are called deceptive primes.

For prime p other than 2, 3 and E, the smallest integer n ≥ 1 such that p divides Rn is the period length of 1/p, e.g. none of 1, 11, 111, 1111 and 11111 is divisible by 17, but 111111 is, and the period length of 1/17 is 6: 1/17 = 0.076E45

All repunit composite with prime length except RE are Fermat pseudoprime (also Euler pseudoprime, Euler-Jacobi pseudoprime and strong pseudoprime) base 10.

If n is Fermat pseudoprime base 10, then Rn is also Fermat pseudoprime base 10 (thus, there are infinitely many Fermat pseudoprimes base 10).

  • If (and only if) n is divisible by 2, then Rn is divisible by 11.
  • If (and only if) n is divisible by 3, then Rn is divisible by 111.
  • If (and only if) n is divisible by 4, then Rn is divisible by 5 and 25.
  • If (and only if) n is divisible by 5, then Rn is divisible by 11111.
  • If (and only if) n is divisible by 6, then Rn is divisible by 7 and 17.
  • If (and only if) n is divisible by 7, then Rn is divisible by 46E and 2X3E.
  • If (and only if) n is divisible by 8, then Rn is divisible by 75 and 175.
  • If (and only if) n is divisible by 9, then Rn is divisible by 31 and 3X891.
  • If (and only if) n is divisible by X, then Rn is divisible by E0E1.
  • If (and only if) n is divisible by E, then Rn is divisible by E, 1E, and 754E2E41.
  • If (and only if) n is divisible by 10, then Rn is divisible by EE01.
  • Let p be a prime >3, m is the smallest integer ≥1 such that Rm is divisible by p, then if (and only if) n is divisible by m, then Rn is divisible by p.
  • Since there are no squares = 11 mod 100, thus the only repunit which is square is 1, in fact, the only repunit which is perfect power is 1.
  • If p is prime differ from 2, 3, and E, then p divides Rp−1.
  • If p is prime differ from E, then p divides Rp−1.

Example of E01-type numbers Edit

n
R6 R2 × R3 1221 × E1 7 · 17
RX R2 × R5 122221 E0E1 prime
R12 R2 × R7 12222221 E0E0E1 157 · 7687
R16 R2 × R9 1222222221 E0E0E0E1 7 · 17 · E61 · 1061
R1X R2 × RE 122222222221 E0E0E0E0E1 prime
  • R10 = 11222211 × EE01
  • R13 = 1233321 × E00E0EE1
  • R18 = 112222222211 × EE00EE01
  • R19 = 123333321 × E00E00EE0EE1
  • R20 = 112233332211 × EE0000EEEE01
  • R20 = 1111222222221111 × EEEE0001
  • R24 = 1122222222222211 × EE00EE00EE01
  • R26 = 11223333332211 × EE0000EE00EEEE01
  • R26 = 111222222222222111 × EEE000EEE001
  • R26 = 11111222222222211111 × EEEEE00001
  • R26 = 1011121222222221211101 × 10EXXE011
  • R29 = 1233333333321 × E00E00E00E0EE0EE0EE1
  • R2E = 12345554321 × E0000E0E00E0E0EE0E0EEEE1
  • R30 = 11222222222222222211 × EE00EE00EE00EE01
  • R30 = 111222333333222111 × EEE000000EEEEEE001
  • R30 = 111111222222222222111111 × EEEEEE000001
  • R34 = 1122334444332211 × EE000000EEEE0000EEEEEE01
  • R34 = 111122222222222222221111 × EEEE0000EEEE0001
  • R36 = 112233333333332211 × EE0000EE0000EEEE00EEEE01
  • R36 = 111222222222222222222111 × EEE000EEE000EEE001
  • R36 = 1111111222222222222221111111 × EEEEEEE0000001
  • R36 = 101111121222222222222121111101 × 10EXE00EXE011
  • R38 = 112222222222222222222211 × EE00EE00EE00EE00EE01
  • R39 = 1234555554321 × E0000E000EE000EE00EEE00EEE0EEEE1
  • R39 = 111222333333333222111 × EEE000000EEE000EEEEEE001
  • R40 = 11223333333333332211 × EE0000EE0000EE00EEEE00EEEE01
  • R40 = 111122223333333322221111 × EEEE00000000EEEEEEEE0001
  • R40 = 11111111222222222222222211111111 × EEEEEEEE00000001
  • R6 = 11 × (E0E1 + 1010)
  • R8 = 11 × (E0E0E1 + 101010)
  • RX = 11 × (E0E0E0E1 + 10101010)
  • R10 = 11 × (E0E0E0E0E1 + 1010101010)

Example of numbers containing only 0 and 1 Edit

n (10n/2 − 1) / E 10n/2 + 1
R2 1 1 × 11 11
R4 11 11 × 101 5 · 25
R6 111 111 × 1001 7 · 11 · 17
R8 5 · 11 · 25 1111 × 10001 75 · 175
RX 11111 11111 × 100001 11 · E0E1
R10 7 · 11 · 17 · 111 111111 × 1000001 5 · 25 · EE01
R12 46E · 2X3E 1111111 × 10000001 11 · 157 · 7687
R14 5 · 11 · 25 · 75 · 175 11111111 × 100000001 15 · 81 · 106X95
R16 31 · 111 · 3X891 111111111 × 1000000001 7 · 11 · 17 · E61 · 1061
R18 11 · E0E1 · 11111 1111111111 × 10000000001 52 · 25 · 24727225
R1X E · 1E · 754E2E41 11111111111 × 100000000001 11 · E0E0E0E0E1
R20 5 · 7 · 11 · 17 · 25 · 111 · EE01 111111111111 × 1000000000001 75 · 141 · 175 · 8E5281
n
R1 1 × 1
R2 1 × 11 1 × 11
R3 1 × 111
R4 1 × 1111 11 × 101
11 × 101
R5 1 × 11111
R6 1 × 111111 111 × 1001
11 × 10101
111 × 1001
R7 1 × 1111111
R8 1 × 11111111 1111 × 10001
11 × 1010101
1111 × 10001
R9 1 × 111111111
111 × 1001001
RX 1 × 1111111111 11111 × 100001
11 × 101010101
11111 × 100001
RE 1 × 11111111111
R10 1 × 111111111111 111111 × 1000001
11 × 10101010101
111 × 1001001001
1111 × 100010001
111111 × 1000001
n
R6 1 × 111 × 1001 E1 · 11
R10 11 × 10101 × 1000001 EE01 · 101
R16 111 × 1001001 × 1000000001 EEE001 · 1001
R20 1111 × 100010001 × 1000000000001 EEEE0001 · 10001
n
R4 11 × 101
R8 101 × 110011
R10 1001 × 111000111 1221001221 × E1
R14 10001 × 111100001111
R18 100001 × 111110000011111 1222210000122221 × E0E1
R20 1000001 × 111111000000111111 1221001221001221001221 × E1

Factorization of dozenal repunits Edit

(Prime factors colored red means "new factors", i.e. the prime factors dividing Rn but not dividing Rk for any k < n)

R1 = 1

R2 = 11

R3 = 111

R4 = 5 × 11 × 25

R5 = 11111

R6 = 7 × 11 × 17 × 111

R7 = 46E × 2X3E

R8 = 5 × 11 × 25 × 75 × 175

R9 = 31 × 111 × 3X891

RX = 11 × E0E1 × 11111

RE = E × 1E × 754E2E41

R10 = 5 × 7 × 11 × 17 × 25 × 111 × EE01

R11 = 1E0411 × 69X3901

R12 = 11 × 157 × 46E × 2X3E × 7687

R13 = 51 × 111 × 471 × 57E1 × 11111

R14 = 5 × 11 × 15 × 25 × 75 × 81 × 175 × 106X95

R15 = X9X9XE × 126180EE0EE

R16 = 7 × 11 × 17 × 31 × 111 × E61 × 1061 × 3X891

R17 = 1111111111111111111

R18 = 52 × 11 × 25 × E0E1 × 11111 × 24727225

R19 = 111 × 46E × 2X3E × E00E00EE0EE1

R1X = E × 11 × 1E × 754E2E41 × E0E0E0E0E1

R1E = 3E × 78935EX441 × 523074X3XXE

R20 = 5 × 7 × 11 × 17 × 25 × 75 × 111 × 141 × 175 × EE01 × 8E5281

R21 = 11111 × 1277EE × 9X06176590543EE

R22 = 112 × 67 × 18X31 × X8837 × 1E0411 × 69X3901

R23 = 31 × 111 × 3X891 × 129691 × 9894576430231

R24 = 5 × 11 × 25 × 157 × 46E × 481 × 2X3E × 7687 × 2672288X41

R25 = 4E × 123EE × 15960E × 160605E10497012E4E

R26 = 7 × 11 × 17 × 27 × 51 × 111 × 2E1 × 471 × 57E1 × E0E1 × 11111 × 18787

R27 = 271 × 365E0031 × 464069563E × 39478E3664E

R28 = 5 × 11 × 15 × 25 × 75 × 81 × 175 × 75115 × 106X95 × 1748E3674115

R29 = E × 1E × 111 × 368E51 × 2013881 × 754E2E41 × 16555E1X1

R2X = 11 × 1587 × X9X9XE × 126180EE0EE × 7605857409257

R2E = 5E × 34E × 46E × 2X3E × 11111 × 32XXE1 × 205812E × EX59849E

R30 = 5 × 7 × 11 × 17 × 25 × 31 × 61 × 111 × E61 × 1061 × EE01 × 3X891 × 1E807X62E61

R31 = 1398641 × 9E2X6732EE74552406X78E76247691

R32 = 11 × 1XE7 × 4901 × 127543624027 × 1111111111111111111

R33 = 111 × 19491 × 1E0411 × 5XE48X1 × 69X3901 × 1064119E745041

R34 = 52 × 11 × 25 × 35 × 75 × 175 × 375 × E0E1 × 11111 × 62041 × 1X7X9741 × 24727225

R35 = 6E × 472488E21 × 4E2EX47X7863X18E5E18253377315E

R36 = 72 × 11 × 17 × 37 × 111 × 157 × 46E × 2X3E × 7687 × 9X17 × 76E077 × E00E00EE0EE1

R37 = 2EE × 4159911 × 273263674E × 4X748X0X65EXX3943375X351

R38 = 5 × E × 11 × 1E × 25 × 1461 × 2181 × 3801 × 754E2E41 × E0E0E0E0E1 × 113006390X1

R39 = 31 × 51 × 111 × 471 × 57E1 × 11111 × 15991 × 3X891 × 1905201 × 7229231 × 7843701

R3X = 11 × 3E × 591 × 7231 × 78935EX441 × 523074X3XXE × 3266712021E531E1

R3E = 832966217X8X111 × 16EE6202E02X5311278504010EX13001

R40 = 5 × 7 × 11 × 15 × 17 × 25 × 75 × 81 × 111 × 141 × 175 × 4541 × EE01 × 1E601 × 106X95 × 8E5281 × 146609481

The product of "new factors" (i.e. the prime factors dividing Rn but not dividing Rk for any k < n) of Rn is Φn(10)/GCD(Φn(10),n), except n = 1 and n = E (in which cases, the two numbers are 1 and E for n = 1, and they are 11111111111 (= RE) and 123456789E for n = E)).

In fact, the repunit Rn = Πd|n, d>1d(10)), where Φd(10) is the dth cyclotomic polynomial evaluated at 10.

Properties Edit

  • Any positive multiple of the repunit Rn contains at least n nonzero digits.
  • The only known numbers that are repunits with at least 3 digits in more than one base simultaneously are 27 (111 in base 5, 11111 in base 2) and 48X7 (111 in base 76, 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). 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 nRj(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). e.g. for every 5-rough number n, there exists a repunit in base 10 that is a multiple of n.
  • 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(mn) = gcd(m - nn) 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(mn) = 1, then gcd(Rm(b)Rn(b)) = R1(b) = 1.
  • If r is a divisor of b−1, then the remainder of Rn(b) modulo r is equal to the remainder of n modulo r, e.g. the remainder of Rn(10) modulo E is equal to the remainder of n modulo E.
  • Repunits in base 10 are related the cyclic patterns of repeating dozenals, it was found very early on that for any prime p greater than 3 except E, the period of the dozenal expansion of 1/p is equal to the length of the smallest repunit number that is divisible by p.
  • The only one repunit prime in base 4 is 5 (=114).
  • The only one repunit prime in base 8 is 61 (=1118).
  • The only one repunit prime in base 14 is 15 (=1114).
  • The only one repunit prime in base 23 is 531 (=11123).
  • The only one repunit prime in base 30 is 31 (=1130).
  • The only one repunit prime in base 84 is 85 (=1184).
  • The only one repunit prime in base X8 is 5E70EX5X8801 (=1111111X8).
  • There are no repunit primes in bases 9, 21, 28, 41, 54, 69, X1, X5, 100, ..., because of algebraic factors, especially, all repunits in base 9 are triangular numbers, and no triangular numbers >3 are primes.
  • Every perfect power base has at most one generalized repunit prime (since generalized repunits in these bases can be factored algebraically), and it is conjectured every non-perfect power base has infinitely many generalized repunit primes (there is at least one known repunit prime or repunit PRP with length < 3000 for all non-perfect power bases 2<=b<=100, and except base 43 (=3*15) and base 77 (=7*11), all other non-perfect power bases 2<=b<=100 have at least one known proven repunit prime with length < 1000, besides, base 43 and base 77 also have one known repunit PRP with length < 3000, (43^2545-1)/42 and (77^2685-1)/76.

List of repunit primes base b Edit

We also consider “negative primes” (e.g. R2(−10) = −E) as primes, since they are primes in the domain Z (the set of all integers).

b length of repunit primes in base b (up to 1000)
−40 2, 5, 15, XE
−3E 5, 17, 1E, 67
−3X 7, 1E, 4E, 5E, 8E, 167, 237
−39 87, 111
−38 2, 7
−37 5, 7, 17, 18E, 1E1, 27E, 35E
−36 2, 3, 4E1, E45
−35 15, 497
−34 45, 57, 855
−33 3, 11, 105
−32 2, 5, 11E, 747, E11
−31 5, 7
−30 27, 13E, 195, 267
−2E E, 11, 67, X7, 35E, 435, 4E1, 5E5, X4E
−2X 3
−29 5, 57, 111
−28 2 (no others)
−27 91, 325, 745
−26 2, E7, 125, 397, 591
−25 7
−24 3, 17, 271, 2XE, 34E, 71E
−23 (none)
−22 E, 91, 16E, 1E1, 24E, 5E5
−21 3, 7, 1E, 25, 4E, 881, EX5
−20 2, 7, E, 17
−1E E, 11, 57, 91, 237, 40E
−1X 3, 5, 11, 37, 67, 85, 8E, 16E, 255
−19 3, 5, 7, 11, 31, 24E
−18 2, 5, 67, 75, 4E1, 565, 80E
−17 15, 31, 111, 117, 447
−16 2, 3, 7, 1E, 61, 511, 665, 775
−15 7, 15, 1E, 3E, 687
−14 3, 5, 7, 1E, 31, 75, 105, 125, 18E, 217, 225
−13 3, 7, 25, 76E
−12 2, 7, 45, 35E, 865
−11 3, E, 15, 17, 647, 7EE
−10 2, 5, E, 91, 141, X37
−E 5, 7, 12E, 171, 307, 3X5
−X 5, 7, 17, 27, 45, 57, 205, 455
−9 3, 4E, 167, 397, 545, 701
−8 2 (no others)
−7 3, 15, 1E, 25, 3E, 51, E2E
−6 2, 3, E, 27, 37, 3E, 4E, 8E, 577
−5 5, 57, 85, 87, 171, 24E
−4 2, 3 (no others)
−3 2, 3, 5, 7, 11, 1E, 37, 1E5, 25E, 347, 401, XE7, E67
−2 3, 4, 5, 7, E, 11, 15, 17, 1E, 27, 37, 51, 67, 85, X7, 11E, 13E, 147, 221, 24E, 4X5, EX5
2 2, 3, 5, 7, 11, 15, 17, 27, 51, 75, 8E, X7, 375, 427, 8X7
3 3, 7, 11, 5E, 87, 391, 76E, 95E, E37
4 2 (no others)
5 3, 7, E, 11, 3E, X7, 105, 131, 437, 655
6 2, 3, 7, 25, 5E, X7, 1X7, 365, 735
7 5, 11, XE, 105, E97
8 3 (no others)
9 (none)
X 2, 17, 1E, 225, 71E
E 15, 17, 61, E7, 637
10 2, 3, 5, 17, 81, 91, 225, 255, 4X5
11 5, 7, E5, 1E7, 617, 6X7, 711, 835
12 3, 7, 17, 27, 35
13 3, 37, 61, 347
14 2 (no others)
15 3, 5, 7, E, 3E, 5E, 2XE
16 2
17 17, 27, 3E, 4E, 51, 8E, 241, 745
18 3, E, 15, X3E
19 3, E, 15, 37, 1X7
1X 2, 5, 67, 85, 25E, 5E5
1E 5
20 3, 5, 17, 45, 5E, 465, 471
21 (none)
22 7, 37, 24E
23 3 (no others)
24 2, 5, 15, 321, 9X7
25 5, 107
26 2, 5, E, 117, 3E5
27 7, 15, 27
28 (none)
29 3, 145
2X 11, X45
2E 221, 901
30 2 (no others)
31 11, 5E, 131, 18E, 327, 375
32 3, 7, 295, 315
33 251, 447
34 2, 5, 7, 17, 1E, 25, 391, 527, 8X5
35 3, 6E, 1X5, 2X1
36 2, 91E
37 5, 11
38 5, 27, 11E
39 17, 45, 11E
3X 2, 7, 17, 57, 157, 301
3E X7
40 17, 1X5, 251, 27E, 907

Demlo numbers Edit

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[1]. They are named after Demlo railway station 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, ..., 123456789XEX987654321. The fact that these are the squares of the repunits has led some authors to call Demlo numbers the infinite sequence of these[2], 1, 121, 12321, 1234321, ..., 123456789XEX987654321, 123456789E00EX987654321, 123456789E0120EX987654321, ..., although one can check these are not Demlo numbers for n = 10, 1E, 2X, ...


Cite error: <ref> tags exist, but no <references/> tag was found
Community content is available under CC-BY-SA unless otherwise noted.