This site is supported by donations to The OEIS Foundation.

Repunit numbers

From OeisWiki
Jump to: navigation, search


This article page is a stub, please help by expanding it.


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

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

Rn:=
n  − 1
i  = 0
  
10i  = 
10n − 1
10 − 1
, n ≥ 0,
where
R 0
is the 0th repunit, taken as the empty sum (defined as the additive identity, i.e. 0), and thus represented by a string of zero 1s (the empty string) which is more conveniently written as 0 (the only case where a leading zero is shown).
A002275 Repunits:
(10n  −  1)  / 9
. Often denoted by
Rn
.
{0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11111111111, 111111111111, 1111111111111, 11111111111111, 111111111111111, 1111111111111111, ...}
A (base 10) repunit prime is a (base 10) repunit that is also a prime number. A necessary, but not sufficient, condition for a repunit (in any base
b
) to be prime is to have a prime number of 1’s, otherwise you can interpret the repunit as if it is in base 1 (tally marks), factorize it, then reinterpret the base 1 (tally marks) factors in base
b
. For example, 111111 = 1001 ⋅  111 = 10101 ⋅  11, obtained from the ordered factorizations of 6 = 2 ⋅  3 = 3 ⋅  2 respectively.

Generalized repunit numbers

A (base
b
) generalized repunit is a number like 1, 11, 111, or 1111 that contains only (zero or more times) the digit 1 (in its base
b
representation). Generalized repunit numbers (in base
b
) are numbers of the form
R  (b)n:=
n  − 1
i  = 0
  
bi  = 
bn − 1
b − 1
, b ∈ ℕ, b ≥ 2, n ≥ 0,
where
R  (b)  0
is the 0th generalized repunit (base
b
), taken as the empty sum (defined as the additive identity, i.e. 0), and thus represented by a string of zero 1’s (the empty string) which is more conveniently written as 0 (the only case where a leading zero is shown). A (base
b
) generalized repunit prime is a (base
b
) generalized repunit that is also a prime number. A necessary, but not sufficient, condition for a repunit (in any base
b
) to be prime is to have a prime number of 1’s, otherwise you can interpret the repunit as if it is in base 1 (tally marks), factorize it, then reinterpret the base 1 (tally marks) factors in base
b
. The base 2 repunit primes are the Mersenne primes.

Generalized repunit numbers (base
b
) converted to base 10

b
Sequence A-number
2 {0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, ...} A000225
3 {0, 1, 4, 13, 40, 121, 364, 1093, 3280, 9841, 29524, 88573, 265720, 797161, 2391484, 7174453, 21523360, 64570081, 193710244, 581130733, 1743392200, 5230176601, 15690529804, ...} A003462
4 {0, 1, 5, 21, 85, 341, 1365, 5461, 21845, 87381, 349525, 1398101, 5592405, 22369621, 89478485, 357913941, 1431655765, 5726623061, 22906492245, 91625968981, 366503875925, ...} A002450
5 {0, 1, 6, 31, 156, 781, 3906, 19531, 97656, 488281, 2441406, 12207031, 61035156, 305175781, 1525878906, 7629394531, 38146972656, 190734863281, 953674316406, 4768371582031, ...} A003463
6 {0, 1, 7, 43, 259, 1555, 9331, 55987, 335923, 2015539, 12093235, 72559411, 435356467, 2612138803, 15672832819, 94036996915, 564221981491, 3385331888947, 20311991333683, ...} A003464
7 {0, 1, 8, 57, 400, 2801, 19608, 137257, 960800, 6725601, 47079208, 329554457, 2306881200, 16148168401, 113037178808, 791260251657, 5538821761600, 38771752331201, ...} A023000
8 {0, 1, 9, 73, 585, 4681, 37449, 299593, 2396745, 19173961, 153391689, 1227133513, 9817068105, 78536544841, 628292358729, 5026338869833, 40210710958665, 321685687669321, ...} A023001
9 {0, 1, 10, 91, 820, 7381, 66430, 597871, 5380840, 48427561, 435848050, 3922632451, 35303692060, 317733228541, 2859599056870, 25736391511831, 231627523606480, ...} A002452
10 {0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11111111111, 111111111111, 1111111111111, 11111111111111, 111111111111111, 1111111111111111, ...} A002275
11 {0, 1, 12, 133, 1464, 16105, 177156, 1948717, 21435888, 235794769, 2593742460, 28531167061, 313842837672, 3452271214393, 37974983358324, 417724816941565, ...} A016123
 (n + 1)
12 {0, 1, 13, 157, 1885, 22621, 271453, 3257437, 39089245, 469070941, 5628851293, 67546215517, 810554586205, 9726655034461, 116719860413533, 1400638324962397, ...} A016125
 (n + 1)
13 {0, 1, 14, 183, 2380, 30941, 402234, 5229043, 67977560, 883708281, 11488207654, 149346699503, 1941507093540, 25239592216021, 328114698808274, 4265491084507563, ...} A091030
14 {0, 1, 15, 211, 2955, 41371, 579195, 8108731, 113522235, 1589311291, 22250358075, 311505013051, 4361070182715, 61054982558011, 854769755812155, 11966776581370171, ...} A135519
15 {0, 1, 16, 241, 3616, 54241, 813616, 12204241, 183063616, 2745954241, 41189313616, 617839704241, 9267595563616, 139013933454241, 2085209001813616, 31278135027204241, ...} A135518
16 {0, 1, 17, 273, 4369, 69905, 1118481, 17895697, 286331153, 4581298449, 73300775185, 1172812402961, 18764998447377, 300239975158033, 4803839602528529, 76861433640456465, ...} A131865
 (n + 1)
17 {0, 1, 18, 307, 5220, 88741, 1508598, 25646167, 435984840, 7411742281, 125999618778, 2141993519227, 36413889826860, 619036127056621, 10523614159962558, ...} A091045
18 {0, 1, 19, 343, 6175, 111151, 2000719, 36012943, 648232975, 11668193551, 210027483919, 3780494710543, 68048904789775, 1224880286215951, 22047845151887119, ...} A218721
19 {0, 1, 20, 381, 7240, 137561, 2613660, 49659541, 943531280, 17927094321, 340614792100, 6471681049901, 122961939948120, 2336276859014281, 44389260321271340, ...} A218722
20 {0, 1, 21, 421, 8421, 168421, 3368421, 67368421, 1347368421, 26947368421, 538947368421, 10778947368421, 215578947368421, 4311578947368421, 86231578947368421, ...} A064108
21 {0, 1, 22, 463, 9724, 204205, 4288306, 90054427, 1891142968, 39714002329, 833994048910, 17513875027111, 367791375569332, 7723618886955973, 162195996626075434, ...} A218724
22 {0, 1, 23, 507, 11155, 245411, 5399043, 118778947, 2613136835, 57489010371, 1264758228163, 27824681019587, 612142982430915, 13467145613480131, ...} A218725
23 {0, 1, 24, 553, 12720, 292561, 6728904, 154764793, 3559590240, 81870575521, 1883023236984, 43309534450633, 996119292364560, 22910743724384881, ...} A218726
24 {0, 1, 25, 601, 14425, 346201, 8308825, 199411801, 4785883225, 114861197401, 2756668737625, 66160049703001, 1587841192872025, 38108188628928601, ...} A218727
25 {0, 1, 26, 651, 16276, 406901, 10172526, 254313151, 6357828776, 158945719401, 3973642985026, 99341074625651, 2483526865641276, 62088171641031901, ...} A218728
26 {0, 1, 27, 703, 18279, 475255, 12356631, 321272407, 8353082583, 217180147159, 5646683826135, 146813779479511, 3817158266467287, 99246114928149463, ...} A218729
27 {0, 1, 28, 757, 20440, 551881, 14900788, 402321277, 10862674480, 293292210961, 7918889695948, 213810021790597, 5772870588346120, 155867505885345241, ...} A218730
28 {0, 1, 29, 813, 22765, 637421, 17847789, 499738093, 13992666605, 391794664941, 10970250618349, 307167017313773, 8600676484785645, 240818941573998061, ...} A218731
29 {0, 1, 30, 871, 25260, 732541, 21243690, 616067011, 17865943320, 518112356281, 15025258332150, 435732491632351, 12636242257338180, 366451025462807221, ...} A218732
30 {0, 1, 31, 931, 27931, 837931, 25137931, 754137931, 22624137931, 678724137931, 20361724137931, 610851724137931, 18325551724137931, 549766551724137931, ...} A218733
31 {0, 1, 32, 993, 30784, 954305, 29583456, 917087137, 28429701248, 881320738689, 27320942899360, 846949229880161, 26255426126284992, 813918209914834753, ...} A218734
32 {0, 1, 33, 1057, 33825, 1082401, 34636833, 1108378657, 35468117025, 1134979744801, 36319351833633, 1162219258676257, 37191016277640225, 1190112520884487201, ...} A132469

Recurrence

The recurrence relation is

R  (b)n  =  (b + 1) R  (b)n −1b  R  (b)n −2 , R  (b)  0  =  0, R  (b) 1  =  1,
where
R  (b)  0
is the 0th generalized repunit (base
b
), taken as the empty sum (defined as the additive identity, i.e. 0), and thus represented by a string of zero 1’s (the empty string) which is more conveniently written as 0 (the only case where a leading zero is shown).

Generating function

The o.g.f. for
R  (b)n
is
G{R (b)n} (x)  :=
n  = 0
  
R  (b)n xn  = 
x
(1 − bx)  (1 − x)
, b ∈ ℕ, b ≥ 2.

Sequences

A055129: Rectangular array of generalized repunit numbers, with T(n, k) =
R  (k)  n
for n ≥ 1, k ≥ 1 (where
R  (1)  n
is defined as n).
A125118: Triangle of generalized repunit numbers, with T(n, k) =
R  (k+1)  n
for n ≥ 1, 1 ≤ k < n.

A060072: (n-1)-digit generalized repunits in base n, for n ≥ 1.

A023037: n-digit generalized repunits in base n, for n ≥ 0.

A031973: (n+1)-digit generalized repunits in base n, for n ≥ 0.

A173468: (n+2)-digit generalized repunits in base n, for n ≥ 1.

A125598: (n-1)-digit generalized repunits in base n+1, for n ≥ 1.

A053696 Numbers which can be represented as a string of three or more 1’s in a base
b   ≥   2
.
{7, 13, 15, 21, 31, 40, 43, 57, 63, 73, 85, 91, 111, 121, 127, 133, 156, 157, 183, 211, 241, 255, 259, 273, 307, 341, 343, 364, 381, 400, 421, 463, 507, 511, 553, 585, 601, 651, 703, 757, 781, 813, 820, 871, ...}

A119598: Numbers that are repunits in four or more bases.

See also