This site is supported by donations to The OEIS Foundation.
Repunit numbers
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
R n := n − 1∑ i = 010 i =
, n ≥ 0,10 n − 1 10 − 1
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:
| (10 n − 1) / 9 |
. Often denoted by
| R n |
.
- {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
[edit]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 = 0b i =
, b ∈ ℕ, b ≥ 2, n ≥ 0,b n − 1 b − 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). 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.
| b |
| b |
| (n + 1) |
| (n + 1) |
| (n + 1) |
Recurrence
[edit]The recurrence relation is
R (b) n = (b + 1) R (b) n −1 − b 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
[edit]The o.g.f. for
| R (b) n |
is
G{R (b) n} (x) := ∞∑ n = 0R (b) n x n =
, b ∈ ℕ, b ≥ 2.x (1 − b x) (1 − x)
Sequences
[edit]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
[edit]