Professional Documents
Culture Documents
Divisibility I. Review
It’s now time to approach a really important topic: divisibility and re-
mainders. This topic, while interesting and important on its own, is also
a gateway to a branch of mathematics called number theory. Number theory
was developed to study the general properties of numbers, especially integers.
This branch of mathematics, which was originally researched for its own sake,
turned out to be indispensable for computer science, software engineering,
cryptography, and a broad spectrum of other theoretical and applied disci-
plines. Divisibility and remainders also make a great math circle subject, as
they can be taught for several years in a row at increasing complexity levels.
Today’s lesson is a review of the material that we studied during Year 1
of our circle. (See [1].)
1
When we talk about divisibility, we imply that we are working with integer numbers
only. Therefore, for the sake of brevity, we may occasionally omit the word “integer” if it
is indicated by the context.
20.2. Divisibility 163
Divisibility of a sum
Suppose that two integers, A and B, are divisible by integer K. In this case,
the sum and the difference of these numbers, A + B and A − B, are divisible
by K as well. (We can write this property using the divisibility notation: if
K|A and K|B, then K|(A + B) and K|(A − B).)
Proof . Since A is divisible by K, then A = K × X, and B = K × Y ,
where X and Y are some integers. Therefore, A + B = K × X + K × Y =
K × (X + Y ).
The same proof would work for subtraction.
Divisibility of a product
Suppose that at least one of the numbers A and B is divisible by K. Then
their product A × B is divisible by K as well.
Proof . Suppose that A is divisible by K. Then A = K × X, and
A × B = K × X × B = K × (X × B). Thus, A × B is divisible by K.
These two simple properties are surprisingly useful.
Example: Is the number 111,222,333,444,555 divisible by 111?
The answer is positive. One way to prove this fact would be to do the
long division. However, being lazy, we would prefer to find a shortcut. Thus,
let’s notice that the numbers 111, 222, 333, 444, 555 are all multiples of 111.
Thus, any combination of these numbers (multiplied by integer coefficients)
will be a multiple of 111 as well.
Next, let’s observe that
111,222,333,444,555 = 111 × 1012 + 222 × 109 + 333 × 106 + 444 × 103 + 555.
Therefore, it is divisible by 111.
Prime Factorization
The next topics on our review list are prime numbers and prime factorization.
Notation
If we do not know the prime factorization of a number, we could use variables.
For example, we can express a generic number and its prime factors as A =
p1 × p2 × · · · × pn . In this formula, the variables pk are used to represent
unknown prime factors. (Since we do not know how many prime factors the
number has, we use the variable n.)
If exponential form matters for a problem, we can employ more advanced
notation: A = pk11 × pk22 × · · · × pkmm . Here, we use variables for both the
distinct prime factors of the number and their exponentials.
Often, younger students tend to shy away from such a notation. It is not
a big deal, and there is no need to force it on them—eventually, they will
learn it. Since we would like this material to be accessible for this younger
group, we will stick to graphical models, which are more intuitive. We will
be visualizing the prime factors of a number as a “bag” filled with these
factors. Such a visualization emphasizes the role of the prime factors as the
building blocks of a number. It also allows us to produce mathematically
rigorous explanations, with the additional benefit of providing a visual way
of thinking about divisibility.
The picture below has three examples that illustrate this model: the first
drawing represents the number 920 and its entire collection of prime factors;
the second drawing—some number A, with prime factorization unknown;
and the third one—some number B that has prime factor 2,017.
920 A B
2
2 p1 ... ...
2
5 ... pn 2017
23
20.2. Divisibility 165
AxB
A B
Todos os Todos os Todos os Todos os
fatores fatores fatores fatores
prime de
e
prime de prime de prime de
A B A B
The factors in the first group multiply to B; in the second group, they
multiply to a number K such that A = B × K. Thus, A is divisible by B.
A = 2 × 2 × 3 × 3 × 3 × 7 × 11 × 37.
The answer to the first question is positive because the entire collection
of prime factors of B is contained in the collection of prime factors of A.
The second answer is negative because C has three copies of prime factor
2 and A has just two copies.
Practice problems
Let’s solve a couple more practice problems. While the problems themselves
are not that challenging, the students usually have difficulty explaining their
solutions with mathematical rigor.
Problem 2 Discussion. The answer is negative, and the reason is that for
2A to be divisible by 3, one of its prime factors has to be 3. Where would this
3 come from? Since 2A is a product of 2 and A, then the prime factors of 2A
are the union of the prime factors of 2 and A. However, 3 does not belong
to the set of prime factors of either of these numbers. Therefore, 3 does not
belong to the union either. The picture below visualizes this explanation.
2xA
A
Does not have factor 3 2 Does not have factor 3
prime factors of A2 = A × A are the union of two sets, each being the set
of prime factors of A. The three copies of factor 2 are distributed between
these two sets; thus, at least two factors 2 belong to one of these sets. Then,
A is divisible by 2 × 2 = 4. Therefore, A2 is divisible by 4 × 4 = 16.
AxA AxA
A A A A
2 2 2 2 2 2
A B
C D
170 Session 20: Divisibility I. Review
1
This warm-up was inspired by the article on the bounded gap between primes in the
New Yorker Magazine [16].
171
172 Session 21: Divisibility II. Relatively Prime Numbers; GCF and LCM
There also exist permutable primes, which are numbers that remain
prime regardless of how their digits are arranged (for example, 337, 373, and
733 are all prime), palindromic primes (primes that read the same forward
and backward), holey primes (the ones which have only digits with holes),
and many other special types of primes.
Of all the baffling questions about prime numbers, the most
important have always been about the distribution of primes:
- Is there a formula for prime numbers?
- How frequently do prime numbers occur?
- As prime numbers get bigger, what happens with the gaps between
them? Do they get bigger as well?
While the answers for some of these questions are already known, others
remain a mystery.
It was proved many years ago that there are infinitely many prime
numbers. (This fact was established by Euclid around 300 BC.) However,
prime numbers appear at random—no formula for generating prime numbers
has been discovered so far.
As numbers get larger, the primes occur less and less frequently. For
example, we all know that many more primes are clustered around 10 than
around 1,000. And, indeed, there are 5 primes between 1 and 10, 25 primes
between 1 and 100, 168 between 1 and 1,000, and 1,229 between 1 and 10,000.
As prime numbers become more and more dispersed, the gaps between
them grow wider. It fact, for any width, it is possible to come up with a
stretch of consecutive numbers that are all composite. (The challenge of
pinpointing such a set is not that difficult.)
At the same time, a conjecture (a hypothesis) was proposed in the 19th
century. It states that, no matter how far you get on the number line, you
will always be able to find a pair of prime numbers that are twins (two
apart). For more than a hundred years, mathematicians have not able to
prove this fact; however, these days they are getting close. A groundbreaking
theorem was proved several years ago that paves the way for the “twin primes”
conjecture.2
Another famous theorem, the Goldbach Conjecture, asserts that every
even integer greater than 2 can be expressed as a sum of 2 primes. For
example, 6 = 3 + 3, 8 = 3 + 5, 24 = 11 + 13, 100 = 53 + 47. This conjecture
is more than 250 years old, and it has not been proved yet!!!
Thus, after centuries of studies, prime numbers still hold plenty of mys-
teries and secrets for us and plenty of challenges for the greatest modern-day
mathematicians.
2
The “Bounded Gap Between Primes” theorem pinpoints a number, a gap bound,
such that as you go further out along the number line, you will occasionally be finding
pairs of primes that are closer than this bound. In the original theorem, proved by Yitang
Zhang in 2012, this bound is equal to 70 million. These days, mathematicians are working
on bringing it down to 2.
21.2. Relatively Prime Numbers 173
This useful rule can be generalized even further. Suppose that we would
like to test divisibility by some number. If we can split this number (the
divisor) into the product of several factors that are all relatively prime to
each other, the problem can be simplified: if the dividend is divisible by each
factor, then it is divisible by the entire product.
174 Session 21: Divisibility II. Relatively Prime Numbers; GCF and LCM
Example:
- To check divisibility by 60, it is sufficient to test divisibility by 3, 4,
and 5.
- To check divisibility by 180, it is sufficient to test divisibility by 9, 4,
and 5.
3 2
3 3 2
2 2
Next, let’s reformulate the same idea in terms of the generic numbers A
and B. The greatest common factor of A and B consists of all prime factors
that are shared by these numbers. (See the picture.)
B
A
MDC(A, B)
Todos os fatores
prime comuns
de A e B
21.4. Least Common Multiple (LCM) 175
Problem 1 Discussion. Suppose that the numbers are A and B and that
their GCF is K. Since both A and B are divisible by K, then their difference
should be divisive by K as well. Therefore, 6 is divisible by K. Thus, K
could be 1, 2, 3, or 6. It is easy to come up with the examples for each of
these values: 7 and 13, 8 and 14, 9 and 15, 12 and 18.
This problem illustrates the important fact that the difference (or sum)
of a pair of numbers is always divisible by their GCF.
270 = 2 33 5
144 = 24 32
Another way of visualizing the same process uses the “bag of prime
factors” model. The drawing below helps us to realize that, to construct
the LCM, we need to take:
- 1 copy of every factor in the prime factorizations of the numbers 270
and 144 that they share in common (factors 2, 3, and 3),
- and 1 copy of every factor that is unique to each number (factors 3 and
5; factors 2, 2, and 2).
270 144
3 2
33
2
5 2 2
You are probably already able to see why this relationship is true. If not,
read through the previous sections one more time and take another look at
the pictures that illustrate how GCF and LCM can be assembled from the
prime factors of the numbers A and B. Can you prove this fact now?
We are done with the core properties of GCF and LCM; it’s problem-
solving time now.
In addition to the main problem set, this lesson includes one practice
set that is composed of simple GCF and LCF problems that emphasize
understanding of how GCF, LCM, and factorization are related.
Problem 2. Little Shmuel has several aunties who live in the town called
Chelm. When Shmuel visited Chelm on January 1st, each auntie cooked
a dish for him: Auntie Edis made pancakes; Auntie Yetta baked pot pies;
Auntie Malka cooked borscht soup; and Auntie Sonia made stuffed cabbage.
How soon should Shmuel visit Chelm next time if he wants to sample all the
dishes again and if Auntie Edis makes pancakes every 2nd day, Auntie Yetta
bakes pot pies every 3rd day, Auntie Malka cooks borsch every 4th day, and
Auntie Sonia makes stuffed cabbage every 7th day?
178 Session 21: Divisibility II. Relatively Prime Numbers; GCF and LCM
Problem 3.
(a) Two numbers x and y are relatively prime, and their product is
equal to 23 × 52 . What could these numbers be? Find all the answers.
(b) The GCF of the numbers x and y is 6, and their product is equal
to 28 × 35 . What could the numbers x and y be? Find all the answers.
Problem 4.
(a) Emma says that since 24 = 4 × 6, divisibility by 24 should follow
from divisibility by 4 and by 6. Rachel says that since 24 = 8 × 3, divisibility
by 24 should follow from divisibility by 8 and by 3? Which girl is right and
why?
(b) Joseph says that since 60 = 3 × 4 × 5, divisibility by 60 follows
from divisibility by 3, by 4, and by 5. Milo says that since 60 = 2 × 3 × 10,
divisibility by 60 follows from divisibility by 3, by 2, and by 10. Which boy
is right?
(c) Come up with an easy test for divisibility by 180.
Problem 5.
(a) Can you find a pair of numbers such that their difference is 24 and
their greatest common factor is 12?
(b) Can you find a pair of numbers such that their difference is 12 and
their greatest common factor is 24?
(c) Can you find a pair of numbers such that their difference is 24 and
their greatest common factor is 7?
Problem 6.
(a) While visiting Cape Verde, Pirate Jim and Pirate Bob bought several
chocolate chip cookies each. Jim paid 93 copper coins for his cookies, and
Bob paid 102 copper coins. What could the price of a single cookie be if it
is an integer?
(b) Pirates Lisa and Elsa bought several barrels of gunpowder each.
Elsa paid one gold coin more than Lisa. What could the price of a single
barrel be if it is an integer?
(c) Captain Hook and Captain Kid bought several tricorn hats each.
Captain Hook paid 6 silver coins more than Captain Kid. What could the
price of a tricorn hat be if it is an integer?
Problem 2. There are horses and cows on a farm. The number of horses
is half of the number of cows plus 10 more. The number of cows is 20 more
than the number of horses. How many horses and how many cows are there
on the farm?
Problem 3. Michael has a wooden triangle with one of its angles equal to
40 degrees. Using this triangle, how can he measure the following:
(a) a 160-degree angle?
(b) a 20-degree angle?
(The sizes of the other angles are unknown.)
Problem 4.
(a) King Haggard has a velvet pouch filled with diamonds. He can
divide these diamonds into 3 equal piles, 4 equal piles, or 5 equal piles. How
many diamonds does he have if it is known that his collection contains less
than 100 diamonds in total?
(b) King Haggard has a stash of gold coins. He is 1 coin short of being
able to divide these coins into 4 equal piles or 5 equal piles or 6 equal piles
or 7 equal piles. How many coins does he have if he has fewer than 500?
Problem 5. What is the smallest integer number n such that 1,000! is not
divisible by 38n ?
Problem 6. For each shape below, place integer numbers at the nodes in
such a way that:
- If two nodes are connected by an edge, then the numbers at these nodes
are not relatively prime.
- If two nodes are not connected, then the numbers at these nodes are
relatively prime.
181
182 Session 22: Divisibility III. Mathematical Race Game
Problem 2. Two numbers are relatively prime, and their product is equal
to 23 × 52 × 133 . What could these numbers be? Find all the answers.
22.3. Take-Home Problem Set 183
Problem 1 Solution.
(a) The smallest common factor is 1. The greatest common factor is
2 × 52 × 11.
(b) The least common multiple is 24 × 32 × 54 × 7 × 11 × 13.
Problem 3 Solution.
(a) The prime factors of the product 23 ×52 should be distributed among
the two numbers. Since the two numbers are relatively prime, the entire set
of prime factors 2 should belong to one of the numbers. The same is true
with 5. Thus, the two answers are: 23 and 52 ; 1 and 23 × 52 .
(b) The factors of 28 × 35 should be distributed among x and y. Since
the common factor is 6, each number should contain at least one copy of
2 and of 3. However, if both numbers contained more than one factor 2;
the common factor would be at least 2 × 2 × 3. Therefore, one number
must contain one factor 2; the other number must contain 27 . Similarly, one
number must contain 3; the other must contain 34 . Thus, the answers are:
2 × 3 and 27 × 34 ; 27 × 3 and 2 × 34 ; 2 × 34 and 27 × 3.
Problem 4 Solution.
(a) Emma is not right. For example, 36 is divisible by 6 and 4, but not
by 24. However, since 8 and 3 are relatively prime, divisibility by 24 follows
from divisibility by 8 and by 3.
(b) Milo is not right. For example, 30 is divisible by 2, 3, and 10, but
not by 60. However, since 3, 4, and 5 are all relatively prime, divisibility by
60 follows from divisibility by 3, by 4, and by 5.
(c) Since 180 = 9 × 4 × 5 and since 9, 4, and 5 are all relatively prime,
divisibility by 180 follows from divisibility by 9, by 4, and by 5.
Problem 5 Solution.
(a) Example: 12 and 36.
(b) If the GCF of two numbers is 24, then each must be a multiple of
24. So, their difference must be a multiple of 24 as well. Thus, it cannot be
12.
(c) If the GCF of two numbers is 7, then each must be a multiple of 7.
So, their difference must be a multiple of 7 as well. Thus, it cannot be 24.
Problem 6 Solution.
(a) Both 93 and 102 are multiples of a price of a cookie. 93 = 3 × 31
and 102 = 3 × 34 = 3 × 2 × 17. So, a cookie could cost 1 or 3 copper coins.
Problem Set 21: Divisibility II. Relatively Prime Numbers; GCF and LCM 333
There are 52 multiples of 19 that are smaller than 1,000; out of them 2
are multiples of 192 . Thus, 1,000! contains 52 + 2 = 54 prime factors 19.
Therefore, n = 55.
Problem 6 Solution.
3*5
2*3 3*5 2*3 3*5
2*3 5*7
2*3*5*7*
2*3*5*7 11*13
Problem 7 Solution.
(a) Suppose that we have a number smaller than p. Then, since p is
prime, it cannot share any common factor with it. Therefore, 2, 3, . . . , p − 1
are all relatively prime to p. This is p − 2 numbers altogether.
(b) The only numbers less than p2 that are not relatively prime to p2
are 1 × p, 2 × p, 3 × p,. . . , (p − 1) × p. Therefore, to get all relatively prime
numbers, we are to exclude this set from the list 2, 3, . . . , p2 − 1. That makes
p2 − 2 − (p − 1) = p2 − 2 − p + 1 = p2 − p − 1 numbers altogether.
P L
Problem 14 Solution.
(a) The smallest multiple of 9 with the sum of its digits adding up to
81 is composed of nine 9’s. Thus, it will be in the column 111111111.
(b) Four consecutive number 27’s come first. For example, they will be
under the numbers 9,369, 9,378, 9,387, 9,396.