Professional Documents
Culture Documents
Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .
http://www.jstor.org/page/info/about/policies/terms.jsp
.
JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of
content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms
of scholarship. For more information about JSTOR, please contact support@jstor.org.
Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to
The American Mathematical Monthly.
http://www.jstor.org
Abstract. It is well known that any integer k has a multiple consisting of only the digits 1 and
0. As an extension of this result, we study integers of the form 111 · · · 000 or 111 · · · 111 that
are a multiple of k. We show that if k > 2 and k is not a power of 3, then the multiple can be
chosen to have at most k − 1 digits.
Theorem 1. For any positive integer k, there exists a positive number n of at most k
digits that consists only of the digits 0 and 1 and is a multiple of k.
Proof. Consider the set of k repunits {1, 11, 111, . . . , } which we denote as S. Con-
sider the remainders of these k numbers when divided by k. If 0 is among them, we
have found a multiple of k. If 0 is not among them, these remainders take on values
from 1 to k − 1. Since there are k of them, by the Pigeonhole principle, two of these re-
mainders must be equal. Hence, the difference between the two repunits corresponding
to these two remainders, which is of the form 1 · · · 10 · · · 0, must be a multiple of k.
Because all numbers in S are repunits, the multiple of k that is found always consists
of a sequence of 1’s followed by zero or more 0’s. The same proof also applies if S is
a sequence of k numbers consisting of 0’s and 1’s, such that the pattern of 1’s in each
member of S is a subpattern of the next number in S. For instance, the set of numbers
in S could be:
0001000
0001100
0011100
0011110
0111110
1111110
1111111.
http://dx.doi.org/10.4169/amer.math.monthly.121.06.529
MSC: Primary 11A05, Secondary 11A51; 97E60
1,
1001,
1001001,
1001001001,
1001001001001,
1001001001001001,
1001001001001001001,
2. NUMBERS OF THE FORM 111 · · · 000 AND 111 · · · 111 THAT ARE MUL-
TIPLES OF k. In this section, we will prove Theorem 1 in another (more compli-
cated) way, but the proof provides additional insights on the number of 1’s and 0’s in
this multiple of k. We first need the following Lemma.
Lemma 2. Suppose a and 10 are relatively prime, R(n) is a multiple of a, and m > n.
If m is a multiple of n, then R(m) is a multiple of a. If R(m) is a multiple of a,
then R(gcd(m, n)) is a multiple of a. If in addition, n is the smallest positive integer
such that R(n) is a multiple of a, then R(m) is a multiple of a if and only if m is a
multiple of n.
Proof. We prove this by induction on r . For r = 0, the divibility test for divisor 3
shows that 3 does not divide R(m). Assume that the result is true for r = n. Suppose
n n
3s divides R(3n+1 m). Note that R(3n+1 m) = R(3n m)t, where t = 102·3 m + 103 m + 1.
Since t is not divisible by 9, this implies that 3s−1 divides R(3n m), implying s − 1 ≤ n
and s ≤ n + 1.
Definition 2. Let T denote the subset of positive integers consisting of only 0’s and
1’s, where each element of T is of the form 111 · · · 000 or 111 · · · 111, i.e., elements
in T are of the form R(a)10b , a ≥ 1, b ≥ 0.
Proof. Note that m divides 10g(m) − 1 = 9R(g(m)). Since 3 is not a factor of m, m di-
vides R(g(m)). Next, let 3v = gcd(3r , g(m)). 3v divides R(g(m)) (see Lemma 1) and
thus 3v m divides R(g(m)). By Lemma 1, there exists a multiple of 3r −v that contains
3r −v 1’s, with each pair of 1’s separated by g(m) − 1 zeros. Since w = 3r −v g(m), mul-
tiplying this number by R(g(m)) equals R(w) and this shows that R(w) is a multiple
of 3r m. Since 3r m10u is a multiple of k, this implies that R(w)10u ∈ T is a multiple
of k that consists of only 1’s and 0’s. Thus we have shown that the integer in T with w
1’s and u 0’s is a multiple of k. Then clearly, a number in T with the number of 1’s a
multiple of w and the number of 0’s larger than u is also a multiple of k.
Note that m and 10 are relatively prime, and by Euler’s theorem, g(m) ≤ φ(m),
where φ is Euler’s totient function. The integer R(w)10u is of length ` = u +
3r −v g(m) ≤ u + 3r −v φ(m) ≤ u + 3r m. If we looked at the smallest integer con-
sisting of the digits 1 and 0 that is a multiple of k, then it can be shorter than `
digits (see http://oeis.org/A004290). For instance, 1001 is a multiple of 13, even
though ` = 6 in this case. It is still an open problem what the characterization of the
sequence http://oeis.org/A004290 is. The following Lemma shows that ` ≤ k,
thus providing another proof of Theorem 1.
Theorem 4. For any positive integer k > 2 that is not a power of 3, there exists a
number n of at most k − 1 digits that consists of the digits 0 and 1 and is a multiple
of k.
For example, this occurs for the case when k > 5 is prime, where p = q = r =
0, m = k, and g(k) divides φ(k) = k − 1. Thus for primes k > 5, both R(g(k))
and R(k − 1) are multiples of k. In fact, primes for which there does not exist a
shorter repunit multiple than R(k − 1) (i.e., g(k) = φ(k) = k − 1) are the full rep-
tend primes or long primes (https://oeis.org/A001913, http://mathworld.
wolfram.com/FullReptendPrime.html), as it is well known that for primes k > 5,
the period of the decimal expansion of 1/k is the same as the length of the smallest
repunit that is a multiple of k.
3. OTHER NUMBER BASES. So far we assume that the integers are expressed as
decimal numbers. Theorems 1 and 2 are also valid in other number bases.
Definition 3. An integer of the form 111 · · · 111 when written in b-ary notation is
called a b-repunit. A b-repunit of i b-ary digits is denoted as
i−1
X bi − 1
Rb (i) = bs = .
s=0
b−1
An integer that, when written as a b-ary number, consists of only the digits 0 and 1 is
called a binary b-ary number.
When b = 8, 10, 16, the word “b-ary” is replaced by octal, decimal, and hexadec-
imal, respectively. The proofs of the following two results are the same as the proofs
for Theorems 1 and 2.
Theorem 5. For any integer b ≥ 2 and positive integer k, there exists a positive binary
b-ary number n of at most k digits that is a multiple of k.
Some of the results in Section 2 rely on the fact that 10 ≡ 1 mod 3, and these can
be extended to other bases as well. For instance, the well-known divisibility test for
dividing decimal numbers by 3 or 9 has an analog in other bases.
Lemma 7. Let a < b be such that b ≡ 1 mod a. Then a b-ary number is divisible by
a if and only if the sum of the digits is divisible by a.
Proof. By induction, it is easy to see that bk ≡ 1 mod a for all k. Consider a b-ary
number n with the sum of digits equal to m. Then n can be written as
m
X
b ki .
i=1
This implies that n ≡ m mod a, and thus n is divisible by a if and only if m is divisible
by a.
Lemma 8. Let a < b be such that b ≡ 1 mod a. For nonnegative integers r and m
there exists a b-ary number that is multiple of a r and consists only of the digits 0 and
1, such that the number of 1’s is a r with each pair of 1’s separated by m zeros.