This site is supported by donations to The OEIS Foundation.

# Repunit primes

A repunit (in base 10) is a number like 1, 11, 111, or 1111 that contains only the digit 1 (in its base 10 representation). The term stands for repeated unit and was coined in 1966 by Albert H. Beiler. A repunit prime is a repunit that is also a prime number.

Repunit primes (in base 10) are primes of the form

Rk:=
 10 k − 1 10 − 1
=
 k  − 1 ∑ i  = 0

(10 − 1) 10  i, k ≥ 1.

## Generalized repunit primes

A generalized repunit (in base
 b
) is a number like 1, 11, 111, or 1111 that contains only the digit 1 (in its base
 b
representation). A generalized repunit prime is a generalized repunit that is also a prime number. Generalized repunit primes (in base
 b
) are primes of the form
R  (b)k:=
 b k − 1 b − 1
=
 k  − 1 ∑ i  = 0

(b − 1) b  i, b ≥ 2, k ≥ 1.

Generalized repunit primes (base
 b
)[1]

 b
Generalized repunit primes (base
 b
) sequences
A-number
2 {11, 111, 11111, 1111111, 1111111111111, 11111111111111111, ...} A117293
3 {, ...} A??????
4 {, ...} A??????
5 {, ...} A??????
6 {, ...} A??????
7 {, ...} A??????
8 {, ...} A??????
9 {, ...} A??????
10 {11, 1111111111111111111, 11111111111111111111111, ...} A004022
11 {, ...} A??????
12 {, ...} A??????
13 {, ...} A??????
14 {, ...} A??????
15 {, ...} A??????
16 {, ...} A??????
17 {, ...} A??????
18 {, ...} A??????
19 {, ...} A??????
20 {, ...} A??????
21 {, ...} A??????
22 {, ...} A??????
23 {, ...} A??????
24 {, ...} A??????
25 {, ...} A??????
26 {, ...} A??????
27 {, ...} A??????
28 {, ...} A??????
29 {, ...} A??????
30 {, ...} A??????

Generalized repunit primes (base
 b
) converted to base 10[1]

 b
Generalized repunit primes (base
 b
) (converted to base 10) sequences
A-number
2 {3, 7, 31, 127, 8191, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727, ...} A000668
3 {, ...} A??????
4 {, ...} A??????
5 {, ...} A??????
6 {, ...} A??????
7 {, ...} A??????
8 {, ...} A??????
9 {, ...} A??????
10 {11, 1111111111111111111, 11111111111111111111111, ...} A004022
11 {, ...} A??????
12 {, ...} A??????
13 {, ...} A??????
14 {, ...} A??????
15 {, ...} A??????
16 {, ...} A??????
17 {, ...} A??????
18 {, ...} A??????
19 {, ...} A??????
20 {, ...} A??????
21 {, ...} A??????
22 {, ...} A??????
23 {, ...} A??????
24 {, ...} A??????
25 {, ...} A??????
26 {, ...} A??????
27 {, ...} A??????
28 {, ...} A??????
29 {, ...} A??????
30 {, ...} A??????

Repunit primes in base b: primes of the form (b^p-1)/(b-1) (Verify.)[2]

b values of p

2: 2 3 5 7 13 17 19 31 61 89 107 127 521 607 1279 2203 2281 3217 4253 4423 9689 9941 11213 19937 21701 23209 44497 86243 110503 132049 216091 756839 859433 1257787 1398269 2976221 3021377 6972593 13466917 20996011 24036583 25964951 30402457 32582657 (?) 37156667 (?) 42643801 (?) 43112609 (?) 57885161 (A000043)

3: 3 7 13 71 103 541 1091 1367 1627 4177 9011 9551 36913 43063 49681 57917 483611 877843 (A048491)

4: 2 (No others)

5: 3 7 11 13 47 127 149 181 619 929 3407 10949 13241 13873 16519 201359 396413 (A004061)

6: 2 3 7 29 71 127 271 509 1049 6389 6883 10613 19889 79987 608099 (A004062)

7: 5 13 131 149 1699 14221 35201 126037 371669 1264699 (A004063)

8: 3 (No others)

9: (None)

10: 2 19 23 317 1031 49081 86453 109297 270343 (A004023)

11: 17 19 73 139 907 1907 2029 4801 5153 10867 20161 293831 (A005808)

12: 2 3 5 19 97 109 317 353 701 9739 14951 37573 46889 769543 (A004064)

13: 5 7 137 283 883 991 1021 1193 3671 18743 31751 101089 (A016054)

14: 3 7 19 31 41 2687 19697 59693 67421 441697 (A006032)

15: 3 43 73 487 2579 8741 37441 89009 505117 (A006033)

16: 2 (No others)

17: 3 5 7 11 47 71 419 4799 35149 54919 74509 (A006034)

18: 2 25667 28807 142031 157051 180181 414269 (A133857)

19: 19 31 47 59 61 107 337 1061 9511 22051 209359 (A006035)

20: 3 11 17 1487 31013 48859 61403 472709 (A127995)

21: 3 11 17 43 271 156217 328129 (A127996)

22: 2 5 79 101 359 857 4463 9029 27823 (A127997)

23: 5 3181 61441 91943 (A204940)

24: 3 5 19 53 71 653 661 10343 49307 (A127998)

25: (None)

26: 7 43 347 12421 12473 26717 (A127999)

27: 3 (No others)

28: 2 5 17 457 1423 (A128000)

29: 5 151 3719 49211 77237 (A181979)

30: 2 5 11 163 569 1789 8447 72871 78857 82883 (A098438)

31: 7 17 31 5581 9973 54493 101111 (A128002)

32: (None)

33: 3 197 3581 6871 (A209120)

34: 13 1493 5851 6379 (A185073)

35: 313 1297

36: 2 (No others)

37: 13 71 181 251 463 521 7321 36473 48157 87421 (A128003)

38: 3 7 401 449 (A128004)

39: 349 631 4493 16633 36341 (A181987)

40: 2 5 7 19 23 29 541 751 1277 (A128005)

41: 3 83 269 409 1759 11731 (A239637)

42: 2 1319

43: 5 13 6277 26777 27299 40031 44773 (A240765)

44: 5 31 167

45: 19 53 167 3319 11257 (A242797)

46: 2 7 19 67 211 433 2437 2719 19531 (A243279)

47: 127 18013

48: 19 269 349 383 1303 15031 (A245237)

49: (None)

50: 3 5 127 139 347 661 2203 6521 (A245442)

51: 4229

52: 2 103 257 4229 6599

53: 11 31 41 1571 (A173767)

54: 3 389 16481 18371

55: 17 41 47 151 839 2267 3323 3631 5657

56: 7 157 2083 2389

57: 3 17 109 151 211 661 16963

58: 2 41 2333

59: 3 13 479 12251

60: 2 7 11 53 173

61: 7 37 107 769

62: 3 5 17 47 163 173 757 4567 9221 10889

63: 5 3067

64: (None)

65: 19 29 631

66: 2 3 7 19 19973

67: 19 367 1487 3347 4451 10391 13411

68: 5 7 107 149 2767

69: 3 61 2371 3557 8293

70: 2 29 59 541 761 1013 11621

71: 3 31 41 157 1583

72: 2 7 13 109 227

73: 5 7

74: 5 191 3257

75: 3 19 47 73 739 13163 15607

76: 41 157 439 593 3371 3413 4549

77: 3 5 37 15361

78: 2 3 101 257 1949

79: 5 109 149 659

80: 3 7

81: (None)

82: 2 23 31 41 7607 12967

83: 5 2713

84: 17 3917

85: 5 19 2111

86: 11 43 113 509 1069 2909 4327

87: 7 17

88: 2 61 577 3727

89: 3 7 43 47 71 109 571 11971

90: 3 19 97 5209

91: 4421

92: 439 13001

93: 7 4903

94: 5 13 37 1789 3581

95: 7 523 9283 10487 11483

96: 2 3343

97: 17 37 1693

98: 13 47 2801

99: 3 5 37 47 383 5563

100: 2 (No others)

101: 3 337 677 1181 6599

102: 2 59 673

103: 19 313 1549

104: 97 263 5437

105: 3 19 389 2687 4783

106: 2 149

107: 17

108: 2 449 2477

109: 17 1193 13679

110: 3 5 13 691 1721 3313 11827

111: 3 337

112: 2 79 107 701 1697 5657

113: 23 37 6563

114: 29 43 73 89 569 709

115: 7 241 1409 2341 2539 7673 12539 16879

116: 59 2503

117: 3 5 19 31

118: 5 163 193

119: 3 19 827 2243 3821

120: 5 373 1693

121: (None)

122: 5 7 67 3803

123: 43 563 1693 4877

124: 599 18367

125: (None)

126: 2 7 37 59 127

127: 5 23 31 167 5281 8969 23297

128: 7 (No others)