You are on page 1of 81

Problem of the Month

Problem 0: September 2019

A point (x, y) in the plane is called a lattice point if it has integer coordinates.
Points P , Q, and R are distinct lattice points. Prove that the measure of ∠P QR
cannot be 60◦ .

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 0: September 2019

Problem
A point (x, y) in the plane is called a lattice point if it has integer coordinates.
Points P , Q, and R are distinct lattice points. Prove that the measure of ∠P QR
cannot be 60◦ .
Hint
Regardless of how you approach this problem, assuming Q is at the origin will
likely simplify your calculations. Can you convince yourself that no generality is
lost if you assume this?
It may be helpful to investigate the trigonometric ratios of ∠P QR. One approach
that we have found involves computing the area of 4P QR in two different ways.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 0: September 2019

Solution
Solution 1
We will assume that P , Q, and R are lattice points and that ∠P QR = 60◦ . Our goal is to
show that these assumptions lead to a contradiction.
First of all, we make three simplifying claims.
Claim 1: We can assume that Q is at the origin.
Proof of Claim 1: Suppose Q has coordinates (u, v). Translating P , Q, and R horizontally by
−u and vertically by −v will preserve the fact that ∠P QR = 60◦ . Since Q is a lattice point
and u and v are integers, these translations move Q to the origin and preserve the fact that P
and R are lattice points.
Claim 2: We can assume P is in the first quadrant.
Proof of Claim 2: If P and R are both reflected in the same axis, they will still be lattice
points and the measure of ∠P QR will still be 60◦ (we are assuming Q is at the origin). By
reflecting in one or both axes, we can move P to the first quadrant without changing the
measure of ∠P QR or the fact that P and R are lattice points.
Claim 3: We can assume that ray QR makes a larger angle with the positive x-axis than ray
QP does. We mean for these angles to be measured counterclockwise from the positive x-axis.
That is, if R were the point (1, −1), we would take the angle QR makes with the positive
x-axis to be 315◦ , and not 45◦ .
Proof of Claim 3: Reflecting both P and R in the line y = x will preserve ∠P QR and the fact
that P and R are lattice points. By possibly reflecting P and R in the line y = x, we can
ensure that P and R satisfy the conditions in the claim.
Labelling P (a, b) and R(c, d), Claim 2 allows us to assume that a ≥ 0 and b ≥ 0. Together with
the facts that ∠P QR = 60◦ and P is in the first quadrant, Claim 3 allows us to assume d ≥ 0.
We will compute the area of 4P QR in two different ways, equate the areas, then derive our
contradiction.
Although our claims have simplified things, there are still several different ways that the points
P and R could be configured relative to each other. For now, we assume 0 < c < a and that
b < d. We will compute the area of 4P QR in terms of a, b, c, and d. To help with the
computation, label A = (0, d), B = (a, 0), and C = (a, d) and consider the diagram below.
R(c, d) C(a, d)
A(0, d)

P (a, b)

Q(0, 0) B(a, 0)

Because of how points A, B, and C are placed, we have that 4QAR, 4RCP , and 4P BQ are
right triangles. Furthermore, the area of 4P QR can be computed by subtracting the areas of
these right triangles from the area of rectangle QACB. If we let t denote the area of 4P QR,
we then have

1 1 1
t = (QB)(QA) − (AR)(AQ) − (BQ)(BP ) − (CP )(CR)
2 2 2
1 1 1 
= ad − cd − ab − (d − b)(a − c)
2 2 2
1 1 1
= ad − cd − ab − (ad − cd − ab + bc)
2 2 2
1 
= 2ad − cd − ab − ad + cd + ab − bc
2
1
= (ad − bc)
2
1
We have shown that when 0 < c < a and b < d, the area of 4P QR is (ad − bc).
2
In all other similar situations, the diagram and calculations are slightly different, but the area
1
will still be (ad − bc) as long as P , Q, and R satisfy Claims 1-3. For example, if c = 0, then
2
1 1
4P QR can be taken to have base RQ and height QB, so its area is (RQ)(QB) = ad.
2 2
1 1
However, we are assuming c = 0, so the area is still (ad − 0) = (ad − bc). You might want to
2 2
identify another case and check for yourself!
To compute the area of 4P QR in a different way, we will use a reasonably well-known formula
1
which says that the area of 4P QR is equal to (QP )(QR) sin ∠P QR. You might want to try
2
to derive this formula by dropping a perpendicular from R to the line containing
√ P Q. The
lengths√QP and QR can be computed using the Pythagorean Theorem: QP = a2 + b2 and
QR = c2 + d2 . Here, the fact that c could be negative
√ is irrelevant since we are squaring it.
3
We are assuming that ∠P QR = 60◦ , so sin ∠P QR = . Equating the two areas, we have
2

1 1 3√ 2 √
(ad − bc) = a + b2 c 2 + d 2 .
2 2 2
Multiplying both sides by 4, we get
√ √ √
2(ad − bc) = 3 a2 + b2 c2 + d2 ,
and squaring both sides gives

4(ad − bc)2 = 3(a2 + b2 )(c2 + d2 ).

Expanding, this gives

4a2 d2 − 8abcd + 4b2 c2 = 3a2 c2 + 3a2 d2 + 3b2 c2 + 3b2 d2 .

After rearranging, we get

a2 d2 − 2abcd + b2 c2 = 3a2 c2 + 6abcd + 3b2 d2

which can be factored to get

(ad)2 − 2(ad)(bc) + (bc)2 = 3[(ac)2 + 2(ac)(bd) + (bd)2 ],

and some more factoring leads to

(ad − bc)2 = 3(ac + bd)2 .

Next, we will show that ad − bc = 0 by showing that if ad − bc = 0, then P, Q, and R lie on a


line and so do not form a triangle. To see this, suppose ad − bc = 0 which means ad = bc. If
b d b
a 6= 0 and c 6= 0, then = , so all of P, Q, and R lie on the line y = mx where m = (recall
a c a
that Q is at the origin). If a = 0, then b 6= 0. This is because P and Q are assumed to be
different, so a and b cannot both be 0. However, a = 0 implies ad = 0, and since ad = bc, this
means bc = 0. Thus, since b 6= 0 we have c = 0. In this case, P , Q, and R all lie on the y-axis.
Using similar reasoning, if c = 0, then a must be 0, which means all three points are on the
y-axis. Therefore, ad − bc 6= 0, as claimed.
We know that (ad − bc)2 = 3(ac + bd)2 and have just shown that the left side of this equation is
not 0. This means we also have ac + bd 6= 0. Therefore, in the equation
(ad − bc)2 = 3(ac + bd)2 , we can divide by (ac + bd)2 to get
 2
ad − bc
= 3,
ac + bd

and after taking square roots, we get


ad − bc √

ac + bd = 3.

√ √
Since a, b, c, and d are integers, this implies 3 is rational. It is well-known that 3 is
irrational, which gives a contradiction. This can only mean our assumption that ∠P QR = 60◦
when P , Q, and R lattice points cannot have been true. In other words, if P , Q, and R are
lattice points, then the measure of ∠P QR cannot be 60◦ .

Note
If you are familiar with vectors, norms, and the dot product, you might be interested in an
alternate way to start Solution 1. As in the beginning of the solution, we can translate Q to
the origin. This would make the sides QP and QR of 4P QR vectors with tails at the origin
and heads at P and R. For any vectors ~u and ~v in the plane, there is a well-known formula
which says ~u · ~v = cos(θ)k~ukk~v k where ~u · ~v is the dot product of ~u and ~v , k~uk and k~v k are the
norms of ~u and ~v respectively, and θ is the angle between ~u and ~v . If P is the point (a, b) and
R is the point (c, d) and we suppose the angle between QP and QR is 60◦ , then this leads to
(a, b) · (c, d) = cos(θ)k(a, b)kk(c, d)k
which is the same as
1√ 2 √
ac + bd = a + b2 c 2 + d 2 .
2
Multiplying both sides by 2 and squaring gives
4(ac + bd)2 = (a2 + b2 )(c2 + d2 ).
After expanding and rearranging, this would lead to
ad − bc √

ac + bd = 3

as in the solution above.


Solution 2
Assume that P , Q, and R are lattice points. We will first make a few simplifying assumptions
about the points P , Q, and R. For additional justification of why these assumptions can be
made safely, see the beginning of Solution 1.
By possibly translating all three points the same distance horizontally and vertically, we can
ensure that Q is at the origin without changing the measure of ∠P QR or the fact that P , Q,
and R are lattice points.
If the measure of ∠P QR is greater than 90◦ , then ∠P QR 6= 60◦ , so there is nothing to prove.
Otherwise, P and R must either be in the same quadrant or in adjacent quadrants. By
possibly reflecting in one or both of the axes, and possibly reflecting in the line y = x, we can
ensure that P and R are lattice points somewhere in the part of the plane covered by the first
and fourth quadrants. That is, we can assume that the x-coordinates of P and R are both
positive. The point Q is at the origin, so none of these reflections will change ∠P QR.
To summarize, we are assuming Q is at the origin and that P and R are in the right half of the
plane. We now let α be the smallest positive angle that ray QP makes with the positive x-axis,
and β be the smallest positive angle that ray QR makes with the positive x-axis.
Suppose the coordinates of P are (a, b) and the coordinates of R are (c, d). Depending on how
P and R are positioned, we have either ∠P QR = α + β, ∠P QR = α − β, or ∠P QR = β − α.
Two such situations are pictured below. There are several others.

R(c, d)
R(c, d)

Q β
α

P (a, b)
β

Q α
P (a, b)

∠P QR = α + β ∠P QR = β − α
If a = 0, then P is on the y-axis. Since R is in the first or fourth quadrant, if ∠P QR were 60◦ ,
then we would have β = 30◦ in this situation, which would mean the slope of the line through
1 d
Q and R is tan 30◦ = √ . On the other hand, the slope of this line is . Equating these two
3 c
√ c √
slopes and rearranging gives 3 = . It is well known that 3 is irrational, so this cannot
d
happen if c and d are both integers. Therefore, if a = 0, then the measure of ∠P QR cannot be
60◦ .
Similarly, if c = 0, then the measure of ∠P QR cannot be 60◦ .
b d
Otherwise, tan(α) and tan(β) are both defined and equal to and , respectively.
a c
◦ ◦
Suppose ∠P QR = α + β. If ∠P QR = 90 , then ∠P QR 6= 60 , so there is nothing to show.
Otherwise,
b d
tan α + tan β +
tan ∠P QR = = a c
1 − tan α tan β bd
1−
ac


which is rational because a, b, c, and d are integers. Since tan 60 = 3 is irrational, this means
∠P QR is not 60◦ .
Suppose ∠P QR = α − β. Similar to above, if ∠P QR = 90◦ then we are done. Otherwise,
b d
tan α − tan β −
tan ∠P QR = = a c.
1 + tan α tan β bd
1+
ac
This is a rational value when a, b, c, and d are integers. Therefore, since tan 60◦ is irrational, it
is not possible for the measure of ∠P QR to be 60◦ .
Finally, a similar argument shows that if ∠P QR = β − α, then tan ∠P QR is rational, and so
∠P QR cannot measure 60◦ .
Therefore, if P , Q, and R are lattice points, then the measure of ∠P QR cannot be 60◦ .
Problem of the Month
Problem 1: October 2019

Let p(x) be the polynomial


20 
1 + x 1 + x3 1 + x9 1 + x27 1 + x81 · · · 1 + x3 .
    

k
That is, p(x) is the product of all binomials of the form 1 + x3 where k ranges
over the integers from 0 to 20 inclusive.
For each n, let cn be the coefficient of xn in p(x).
Compute the following sum of 1 000 001 coefficients of p(x):

c1000000 + c1000001 + c1000002 + c1000003 + · · · + c1999999 + c2000000

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 1: October 2019

Problem
Let p(x) be the polynomial
20 
1 + x 1 + x3 1 + x9 1 + x27 1 + x81 · · · 1 + x3 .
    

k
That is, p(x) is the product of all binomials of the form 1 + x3 where k ranges
over the integers from 0 to 20 inclusive.
For each n, let cn be the coefficient of xn in p(x).
Compute the following sum of 1 000 001 coefficients of p(x):

c1000000 + c1000001 + c1000002 + c1000003 + · · · + c1999999 + c2000000

Hint
Try a few examples of “smaller” products. For example, expand

(1 + x)(1 + x3 )(1 + x9 )(1 + x27 )(1 + x81 )

and look for a pattern in the coefficients. It might also help to read about how
numbers can be expressed in bases other than 10. If you have not thought about
this before, try searching it on the internet! One final note: be careful not to
k
confuse x3 and (x3 )k . The notation can be a bit confusing and perhaps
k k
ambiguous, but in this problem, x3 means x(3 ) .

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 1: October 2019

Solution
To solve this problem, we need to understand the coefficients of the expanded
form of p(x). We will be able to do this by showing that the coefficients of p(x)
are “counting” something. This will allow us to change the problem into a
counting problem. Using the coefficients of a polynomial to count things is a very
common and useful technique in an area of mathematics called enumerative
combinatorics.
This translation into a counting problem is based on the following observation:
After p(x) is expanded and like terms are collected, the coefficient of xk , namely
ck , is equal to the number of ways k can be expressed as a sum of distinct
numbers from the list
1, 3, 32 , 33 , . . . , 320 .
To get an idea of what happens when p(x) is expanded, first consider the simpler
product (a + b)(c + d)(e + f ). Expanding in two steps, we get

(a + b)(c + d)(e + f ) = (ac + ad + bc + bd)(e + f )


= ace + acf + ade + adf + bce + bcf + bde + bdf.

Notice that there are 8 terms in this product of three binomials and that 23 = 8.
Another way to think of the expansion of (a + b)(c + d)(e + f ) is as follows: Each
term in the resulting sum is formed by choosing 3 elements, one from each of the
3 sets {a, b}, {c, d}, and {e, f }, and multiplying them together. For example, if
we choose a, c, and f , then we get the product acf which is indeed one of the
terms in the expanded sum. Since there are 2 choices for each of the 3 elements,
we have 23 products in the expanded sum.
This generalizes to products of more than 3 binomials. In this question, we are
interested in the following product of 21 binomials:
20
(1 + x)(1 + x3 )(1 + x9 )(1 + x27 )(1 + x81 ) · · · (1 + x3 ).
Similar to the earlier product, the terms in the expanded sum can each be formed
by choosing 21 elements, one from each of the 21 sets
20
{1, x}, {1, x3 }, {1, x9 }, . . . , {1, x3 },
and multiplying them together. In this case there will be 221 such terms. For
2 19 20
example, one of the terms will be 1 × 1 × x3 × 1 × 1 × · · · × 1 × x3 × x3 .
2 19 20
Using exponent rules, we can rewrite this term as x3 +3 +3 .
Each term in the expanded sum is a product of some number of 1s and distinct
n
terms of the form x3 with 0 ≤ n ≤ 20. Thus, each term can be simplified into
the form xk where k is a sum of distinct numbers from the list 1, 3, 32 , . . . , 320 .
Therefore, when p(x) is expanded, there is a term xk for every way there is to
write k as a sum of distinct numbers in the list 1, 3, 32 , . . . , 320 . After any like
terms in the expanded sum are collected, the coefficient of xk , namely ck , will be
equal to the number of ways that k can be expressed as a sum of distinct
numbers from the list 1, 3, 32 , . . . , 320 .
Note: It turns out that every coefficient of p(x) is either 0 or 1. This corresponds
to the fact that every positive integer either cannot be expressed as a sum of
distinct powers of 3, or it can only be expressed as a sum of distinct powers of 3
in one way. With respect to the argument in the previous paragraph, this means
that there are actually no like terms to be collected and so we have ck = 0 or
ck = 1. This fact is not needed for the solution, but it is still interesting and will
be discussed further later.
Since ck is equal to the number of ways that k can be expressed as a sum of
distinct numbers from the list 1, 3, 32 , . . . , 320 , the sum

c1000000 + c1000001 + c1000002 + · · · + c1999999 + c2000000

is equal to the number of sums of distinct numbers from the list 1, 3, 32 , . . . , 320
which are between 106 and 2 × 106 (inclusive). All that remains is to count these
sums.
First, note that

313 = 1 594 323 < 2 × 106 < 4 782 969 = 314 .

Since 314 exceeds 2 × 106 on its own, and hence so do all higher powers of 3, the
largest power of 3 that can occur in a sum less than 2 × 106 is 313 .
Also, note that
30 + 31 + 32 + · · · + 312 = 797 161
which is less than 106 . This means that any sum of distinct powers of 3 that is at
least 106 must include a power at least as large as 313 . Since this is the largest
allowable power, any such sum must include 313 .
Furthermore, 312 + 313 = 2 125 764, which is larger than 2 × 106 , so the sums we
wish to count cannot include 312 .
It can be verified using a calculator (or a pencil, some paper, and spare time) that
106 < 313 < 30 + 31 + 32 + · · · + 311 + 313 = 1 860 043 < 2 × 106 ,
and so there are no other restrictions on which powers can be included in such a
sum. In summary, we have that a sum of distinct powers of 3 which is between
106 and 2 × 106
1. includes 313 ,
2. does not include 312 , and
3. includes some (possibly none) of the powers of 3 from 30 to 311 inclusive.
Therefore, the number of sums of distinct powers of 3 between 106 and 2 × 106 is
212 = 4096 since for each of the 12 numbers 30 , 31 , . . . , 311 , such a sum can either
include this number or not include it. Thus, there are 4096 such sums and so
c1000000 + c1000001 + c1000002 + · · · + c1999999 + c2000000 = 4096

Ternary expansions and why ck is always 0 or 1:


As promised, we now include some discussion about the fact that an integer
either cannot be expressed as a sum of distinct powers of 3, or it can be
expressed in only one way. This may remind you of binary expansions of positive
integers. Essentially, a binary expansion of a positive integer is an expression of
that integer as a sum of powers of 2 where each power can be used at most once.
There is also such a thing as a ternary expansion which is an expression of an
integer as a sum of powers of 3 where each power may be used at most two times.
Both of these are similar to the more familiar base 10 or decimal expansion of a
positive integer, which is really an expression of the number as a sum of powers
of 10 where each power is allowed to be used at most nine times. Binary, ternary,
and decimal expansions of positive integers always exist and are always unique.
Relating back to the the problem, the fact that the coefficients of p(x) are either
0 or 1 is related to ternary expansions. In this question we are able to use each
power of 3 at most once which means that we will lose the ability to write some
integers using powers of 3 resulting in ck = 0 for some k. For example, c6 = 0,
and this corresponds to the fact that the only way to write 6 as a sum of powers
of 3 using any power of 3 at most twice is 6 = 3 + 3. Hence, 6 cannot be
expressed as a sum of distinct powers of 3. However, if a positive integer can be
written as a sum of distinct powers of 3 (and hence can be written as a sum of
powers of 3 where each power is used at most twice), the uniqueness of ternary
expansions says there is only one way to do it, which means ck ≤ 1 for all k. If
you are interested, I suggest you read a bit about ternary expansions of positive
integers and try to understand how they relate to this problem. Here is a
stand-alone justification that if a positive integer can be expressed as a sum of
distinct powers of 3, then this can be done in only one way.
Suppose k is a positive integer, n1 < n2 < · · · < nr are nonnegative integers, and
m1 < m2 < · · · < ms are nonnegative integers satisfying

k = 3n1 + 3n2 + · · · + 3nr−1 + 3nr = 3m1 + 3m2 + · · · + 3ms−1 + 3ms .

(Note that the two given sums express k as the sum of distinct powers of 3 and
that we are not assuming that r = s.) We will show that r = s, and that
n1 = m1 , n2 = m2 , and so on up to nr = ms . In other words, we will show that
the two expressions of k as a sum of distinct powers of 3 must actually be the
same expression.
Suppose nr < ms . Since these are integers, it follows that nr + 1 ≤ ms . Since
n1 , n2 , . . . , nr are all distinct and between 0 and nr inclusive (nr is the largest),
we certainly have that

k = 3n1 + 3n2 + · · · + 3nr ≤ 30 + 31 + 32 + · · · + 3nr .


3nr +1 − 1
It can be shown that the sum on the right equals . (You can prove this
2
formula yourself, or observe that the sum on the right is a finite geometric series.)
Therefore,

n1 n2 nr 3nr +1 − 1 3nr +1
k = 3 + 3 + ··· + 3 ≤ < < 3nr +1 ≤ 3ms .
2 2
Reading the chain of inequalities, this implies k < 3ms .
We also have
k = 3m1 + 3m2 + · · · + 3ms ≥ 3ms ,
which implies k ≥ 3ms . We cannot have k ≥ 3ms and k < 3ms simultaneously, so
our assumption that nr < ms must have been false. This means ms ≤ nr . Similar
reasoning can be used to show that nr ≤ ms . Together with ms ≤ nr , we get
nr = ms .
This means we can subtract the largest term in each sum and establish that the
following two “reduced” sums are equal

3n1 + 3n2 + · · · + 3nr−1 = 3m1 + 3m2 + · · · + 3ms−1 .

The argument above can now be repeated to show that the largest power of 3 in
each of the sums above must be the same, that is, nr−1 = ms−1 . Continuing this
process, we get nr−2 = ms−2 , and so on.
Eventually, one of the two sums must “run out” of terms. Since the two “reduced”
sums are equal at every stage, the two sums must run out of terms at the same
time. (If one side ran out before the other then we would have 0 equal to a sum
of powers of 3 which is impossible.) This means we must have r = s. At the
second to last stage we will have 3n1 = 3m1 and so we will conclude n1 = m1 to
complete the argument.
This argument is using what is called inductive reasoning. The principle of
mathematical induction, which you may have heard of, is a technique in
mathematics which solidifies parts of this kind of argument like “eventually one of
the two sums must run out”. If you have seen mathematical induction before (or
would like to read up on it), a nice exercise might be to try to write a more
rigourous proof of the above fact.
Problem of the Month
Problem 2: November 2019

(a) Several dials are each labelled with the integers from 1 through 4 in
clockwise order. The dials are arranged in a row and initially configured so
that each dial shows 1 at the top:

1 1 1 1 1
···
4

2
3 3 3 3 3

A move consists of rotating two adjacent dials in the same direction by the
same number of positions. For example, one possible move is to rotate the
second and third dials by one position in the counterclockwise direction
resulting in the configuration shown:

1 2 2 1 1
···
4

2
3 4 4 3 3

There are k ≥ 2 dials and they are initially configured so that each shows 1
at the top. In terms of k, determine how many possible configurations of the
dials are attainable by performing a sequence of moves.
(b) Suppose now that there is an integer n ≥ 2 so that each of the k ≥ 2 dials is
labelled in clockwise order by the integers 1 through n beginning with 1 at
the top. Find the number of configurations of the dials that are attainable
by a sequence of moves. Your answer should be in terms of n and k. Again,
a move consists of rotating two adjacent dials in the same direction by the
same number of positions.
(c) Answer the question in part (b) with the following additional type of move
allowed: rotate the leftmost and rightmost dials in the same direction by the
same number of positions.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 2: November 2019

Problem

(a) Several dials are each labelled with the integers from 1 through 4 in
clockwise order. The dials are arranged in a row and initially configured so
that each dial shows 1 at the top:

1 1 1 1 1
···
4

2
3 3 3 3 3

A move consists of rotating two adjacent dials in the same direction by the
same number of positions. For example, one possible move is to rotate the
second and third dials by one position in the counterclockwise direction
resulting in the configuration shown:

1 2 2 1 1
···
4

2
3 4 4 3 3

There are k ≥ 2 dials and they are initially configured so that each shows 1
at the top. In terms of k, determine how many possible configurations of the
dials are attainable by performing a sequence of moves.
(b) Suppose now that there is an integer n ≥ 2 so that each of the k ≥ 2 dials is
labelled in clockwise order by the integers 1 through n beginning with 1 at
the top. Find the number of configurations of the dials that are attainable
by a sequence of moves. Your answer should be in terms of n and k. Again,
a move consists of rotating two adjacent dials in the same direction by the
same number of positions.
(c) Answer the question in part (b) with the following additional type of move
allowed: rotate the leftmost and rightmost dials in the same direction by the
same number of positions.
Hint
Here are two distinct but related hints for this problem:
(1) Does the order in which moves are applied affect the outcome of a sequence
of moves?
(2) Suppose k = 4 and the dials are configured as follows:

3 4 1 ?
2

?
1 2 3 ?

Is it possible to determine the position of the 4th dial?

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 2: November 2019

Solution

(a) We first observe that if a sequence of moves is performed, the order in which
the moves are performed does not affect the overall outcome. To prove this,
it is enough to show that if two different moves are performed in either
order, the same result is achieved.
Suppose Move A and Move B both involve the ith dial. In particular, let us
suppose Move A rotates the ith dial by a positions and Move B rotates the
ith dial by b positions. Here, a and b are allowed to be integers and a
negative integer represents a counterclockwise rotation. The net effect of
Move A followed by Move B on the ith dial is a rotation by a + b positions.
The net effect of Move B followed by Move A is a rotation by b + a = a + b
positions. Therefore, the net effect on the ith dial is the same regardless of
the order in which the moves are performed.
If the ith dial is affected by Move A and not by Move B, then the net effect
of Move A and Move B on the ith dial is the same as the effect of Move A,
regardless of the order. Similarly, if the ith dial is affected by Move B and
not by Move A, then the net effect is the same regardless of the order in
which the moves are performed.
Of course, if neither Move A nor Move B has any effect on the ith dial, then
the effect of Move A and Move B on the ith dial is the same regardless of the
order in which the moves are performed.
It follows that the final state of the dials only depends on which moves were
performed and not on the order in which they were performed. Also, there is
no reason to rotate the same pair of dials twice since the same effect could
be achieved with a single rotation. Furthermore, there is no reason to rotate
the same pair of dials by more than three positions in either direction since
this would result in the dial going all the way around at least once. The
same effect could be achieved using a rotation by fewer positions. Finally,
the effect of a rotation in the counterclockwise direction can be achieved by
a rotation in the clockwise direction (possibly by a different number of
positions). Therefore, there is no reason to rotate any pair of dials in the
counterclockwise direction.
There are k − 1 possible pairs of dials that can be rotated. Each pair may
be not rotated at all, rotated clockwise by one position, rotated clockwise by
two positions or rotated clockwise by three positions. As mentioned in the
previous paragraph, any other move on a pair of dials has the same effect on
the dials as one of these four moves. Therefore, there are a total of four
possible moves that can be performed on each of the k − 1 pairs of dials.
This means any final configuration that can be achieved by a sequence of
moves can be achieved by one of these 4k−1 sets of moves.
It is possible that two sets of moves lead to the same final configuration, so
this merely establishes that there are at most 4k−1 attainable configurations.
Suppose a1 , a2 , . . . , ak−1 is a sequence with ar taking one of the values
1, 2, 3, or 4 for each 1 ≤ r ≤ k − 1. There are 4k−1 such sequences. By
rotating the first two dials, we can make the number on top of the first dial
equal to a1 . This will also rotate the second dial, but we can now rotate the
second and third dials to get the second dial to have a2 at the top.
Furthermore, this will not change the number at the top of the first dial.
Continuing in this way, we can rotate the third and fourth dials to get the
third dial to have a3 at the top without changing the first two dials. This
can be continued to get ar on the top of dial r for 1 ≤ r ≤ k − 1. Regardless
of the position of the k th dial, this gives a way to produce at least 4k−1
different configurations since any two of these configurations differ on at
least one of the first k − 1 dials.
Therefore, there are at least 4k−1 configurations. Since there are also at
most 4k−1 configurations, this means there are exactly 4k−1 configurations.
(b) As in part (a), the order in which moves are applied does not matter. It
only matters which moves are applied.
There are k − 1 possible pairs of dials to be rotated and n possible positions
by which to rotate each pair. As in part (a), the effect of any number of
rotations of the same pair of dials can be achieved by a single clockwise
rotation. Following a similar argument to the one in part (a) (with 4
replaced by n), this means there are no more than nk−1 possible
configurations.
Also similar to part (a), the first k − 1 dials can be configured in any of the
nk−1 possible ways (though without control over the k th dial). This shows
that there are at least nk−1 configurations.
Since there are also at most nk−1 attainable configurations, there must be
exactly nk−1 attainable configurations.
(c) We first suppose k is even. Consider the following sequence of moves, each
by one position:

Dials Direction
1 and 2 clockwise
2 and 3 counterclockwise
3 and 4 clockwise
4 and 5 counterclockwise
.. ..
. .
k − 2 and k − 1 counterclockwise
k − 1 and k clockwise

This alternating pattern ends up with the final move being clockwise because
k is even. Each of dials 2 through k − 1 has been rotated by one position
clockwise and one position counterclockwise. Therefore, the net effect of this
sequence of moves is to rotate dials 1 and k clockwise by one position and to
leave all other dials in their original position. This sequence of moves could
be repeated to attain any configuration achievable by the new type of move.
Therefore, the new type of move can be mimicked by the original moves, so
including it does not introduce any new attainable configurations.
Thus, when k is even, the number of configurations is nk−1 .
We now suppose k and n are odd and perform an “alternating” sequence of
moves like in the previous case. Again, each move is by one position:

Dials Direction
1 and 2 clockwise
2 and 3 counterclockwise
3 and 4 clockwise
4 and 5 counterclockwise
.. ..
. .
k − 2 and k − 1 clockwise
k − 1 and k counterclockwise
k and 1 clockwise

Since k is odd, this alternating pattern leads to dials k − 1 and k being


rotated counterclockwise, and finally dials k and 1 being rotated clockwise.
The net effect of this sequence of moves is that dial 1 is rotated clockwise by
two positions and all other dials are unchanged.
Since n is odd, n + 1 is even, which means n+1
2 is an integer. If the sequence
n+1
of moves above is repeated 2 times, the net effect will be to rotate the first
dial by 2 n+1

2 = n + 1 positions clockwise, which is the same as rotating by
one position clockwise.
By repeating everything that has been done so far, we can independently
move the first dial to any position we like without changing the position of
any other dials.
Now imagine performing a new sequence of moves similar to those in the
table above by increasing each integer in the above table by 1, with the
exception of k which we change to 1. This modified sequence of moves will
rotate dial 2 by two positions clockwise and have no overall effect on any
other dial. Using the same reasoning as in the previous paragraph, this
modified sequence can be repeated n+1 2 times to have the effect of rotating
dial 2 clockwise by one position. Repeating all of this as many times as
desired, we can achieve the effect of rotating dial 2 by any number of
positions without rotating any other dials.
This can be repeated for any other dial. In other words, with the new type
of move, each dial can be moved to any position without changing any of the
others.
Therefore, when k and n are both odd, each of the nk configurations of the
dials is attainable.
Finally, we consider the case when k is odd and n is even. As with the case
when k and n are both odd, it is still possible to rotate any individual dial
by exactly two positions clockwise without changing the position of any
other dial. If you read that part of the argument closely, you will notice that
it only relied on the fact that k was odd and was independent of n.
Similar to the argument used for parts (a) and (b), by only using the
original allowed moves, we can get the dials to a configuration where the
first k − 1 dials are in any positions we like. Furthermore, since we can
rotate the k th dial by multiples of two positions clockwise, there are n2
positions of the k th dial for each of the nk−1 configurations of the first k − 1
dials. This means there are at least
n k−1  nk
n =
2 2
attainable configurations.
nk
We will now argue that there are at most 2 configurations.
Notice that in the initial configuration, the sum of the numbers showing at
the top of each dial is k × 1 = k which we are assuming is odd. Each move
changes two dials by the same amount, which means it adds or subtracts an
even number from the total of the numbers on the top of the dials.
Therefore, every attainable configuration must have the property that the
total of the numbers showing on the top of the dials is odd.
Since n is even, exactly n2 of the integers in the list 1, 2, 3, 4, . . . , n are even,
and exactly n2 are odd. Suppose the dials are configured in some way and for
each r with 1 ≤ r ≤ k − 1, the number showing at the top of the rth dial is
ar . If a1 + a2 + · · · + ak−1 is even, then turning the k th dial so that any of
the n2 numbers 1, 3, 5, . . . , n − 1 is at the top will make the sum of the
numbers of the top of all k dials odd. Turning the k th dial to any of the
other n2 positions will make the total even. Similarly, if a1 + a2 + · · · + ak−1
is odd, then setting the k th dial to have any of 2, 4, 6, . . . , n at the top will
make the total odd, and setting it to any of 1, 3, 5, 7, . . . , n − 1 will make the
total odd.
Either way, for any of the nk−1 configurations of the first k − 1 dials, there
are n2 ways to arrange the k th dial to make the sum of the numbers at the
top of the dials odd, and n2 ways to make the sum even. This means there
k
are at least n2 configurations with the sum of the top numbers being odd,
k
and at least n2 with the sum of the top numbers being even. Since
nk nk k
2 + 2 = n , this accounts for all configurations of the k dials. Therefore,
k
there are exactly n2 configurations of the dials for which the sum of the
entries at the top of the dials is odd.
k
This implies there are at most n2 attainable configurations, so there are
k
exactly n2 attainable configurations. The following table summarizes the
results we have collected:

k n # of attainable configurations
even even nk−1

even odd nk−1

nk
odd even
2

odd odd nk
Problem of the Month
Problem 3: December 2019

Let a, b, c, and d be rational numbers and f (x) = ax3 + bx2 + cx + d. Suppose


f (n) is an integer whenever n is an integer and that
1 3 2 1 4
n − n − ≤ f (n) ≤ n3 + n2 + 2n +
3 3 3 3
for every integer n with the possible exception of n = −2.
1
(a) Show that a = .
3
(b) Find f (102019 ) − f (102019 − 1).

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 3: December 2019

Problem
Let a, b, c, and d be rational numbers and f (x) = ax3 + bx2 + cx + d. Suppose
f (n) is an integer whenever n is an integer and that
1 3 2 1 4
n − n − ≤ f (n) ≤ n3 + n2 + 2n +
3 3 3 3
for every integer n with the possible exception of n = −2.
1
(a) Show that a = .
3
(b) Find f (102019 ) − f (102019 − 1).

Hint
1 2 1 4
The graphs of the polynomials y = x3 − x − and y = x3 + x2 + 2x + look
3 3 3 3
quite different near the origin. However, since they have the same leading term,
they look nearly identical if you zoom out. Try graphing these two cubics on the
same axes using graphing software. The function f (x) lies between these two
cubic functions (at least on integer inputs), so it should have the same overall
1
“shape”. This suggests that a = . There are short arguments to justify this
3
using limits, but there are also more elementary approaches. One thing you
1
might try is to subtract n3 from each of the three expressions in the chain of
3
1
inequalities. If a 6= , you will have a cubic that is trapped between two
3
quadratics, which should make you suspicious.
For (b), if you substitute n = 0 into the inequality, you should find that
2 4
− ≤ f (0) ≤ . Since f (0) is an integer, this means either f (0) = 0 or f (0) = 1.
3 3
It is possible to find b, c, and d by gathering and using similar information.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 3: December 2019

Solution
The solution to part (b) will be presented first, which means we will assume
1
a = for now and prove it later.
3
(b) Since
1 3 2 1 4
n − n − ≤ f (n) ≤ n3 + n2 + 2n + ,
3 3 3 3
for all integers (except possibly n = −2), this chain of inequalities provides
an interval in which f (n) lies for each integer n 6= −2. Since f (n) is an
integer, this will give a finite number of possible values of f (n). By finding
integers n for which there are a small number of possibilities for f (n), we
will be able to find a finite list of possibilities for f (x). To help with this,
consider the polynomial
   
1 3 4 1 2
h(x) = x + x2 + 2x + − x3 − x − = x2 + 3x + 2.
3 3 3 3
For an integer n, h(n) is the length of the interval containing f (n). Integers
n where h(n) is small will have a small number of possibilities for the value
of f (n).
Notice that h(x) = (x + 1)(x + 2), so we expect h(n) to be smallest when n
is either equal to or near −1 and −2. We are not guaranteed that the
inequalities hold for n = −2. Therefore, we will substitute n = −1, n = 0,
and n = −3.
When n = −1,
1 2 1 4
(−1)3 − (−1) − ≤ f (−1) ≤ (−1)3 + (−1)2 + 2(−1) +
3 3 3 3

0 ≤ f (−1) ≤ 0
which means f (−1) = 0.
When n = 0, we have
1 3 2 1 4
(0) − (0) − ≤ f (0) ≤ (0)3 + (0)2 + 2(0) +
3 3 3 3
2 4
− ≤ f (0) ≤
3 3
and since f (0) is an integer, this means f (0) = 0 or f (0) = 1.
Finally, with n = −3, we get
1 2 1 4
(−3)3 − (−3) − ≤ f (−3) ≤ (−3)3 + (−3)2 + 2(−3) +
3 3 3 3
20 14
− ≤ f (−3) ≤ −
3 3
and since f (−3) must be an integer, we get that f (−3) is either −6 or −5.
We can translate this into information about the unknown coefficients, b, c,
and d of f (n). From f (−1) = 0, we get
1 1
0 = (−1)3 + b(−1)2 + c(−1) + d = − + b − c + d
3 3
1
or b − c + d = .
3
Substituting n = 0, we have that f (0) = d, which implies d = 0 or d = 1.
Since f (−3) = −5 or f (−3) = −6 and
1
f (−3) = (−3)3 + b(−3)2 + c(−3) + d = −9 + 9b − 3c + d.
3
it must be that 9b − 3c + d = 4 or 9b − 3c + d = 3. This means b, c, and d
satisfy one of the following four systems of equations:
 
1 1
b − c + d = b − c + d =

 

3 3

 


 

 
 9b − 3c + d = 3  9b − 3c + d = 3

 


 

 
 d = 0  d = 1
 
1 1
b − c + d = b − c + d =

 

3 3

 


 

 
 9b − 3c + d = 4  9b − 3c + d = 4

 


 

 
 d = 0  d = 1

Consider the system on the top-left. If d = 0 is substituted into the first two
1
equations, they simplify to b − c = and 9b − 3c = 3. Multiplying the first
3
of these resulting equations by 3 gives 3b − 3c = 1, which can be subtracted
1 1
from 9b − 3c = 3 to get 6b = 2 or b = . Since b − c = , this means c = 0.
3 3
1 1
Therefore, one possibility for the polynomial f (x) is f (x) = x3 + x2 .
3 3
The other three systems can be solved in a similar way. This gives a total of
four possibilities for f (x) which are listed below in factored form:
1 3 1 2 1
x + x = x2 (x + 1)
3 3 3
1 3 2 2 4 1
x + x + x + 1 = (x + 1)(x2 + x + 3)
3 3 3 3
1 3 1 2 1 1
x + x + x = x(x + 1)(2x + 1)
3 2 6 6
1 3 5 2 3 1
x + x + x + 1 = (x + 1)(2x2 + 3x + 6)
3 6 2 6
When n = 1 is substituted into the first, second, and fourth polynomials,
2 10 11
the outputs are , , and , respectively. None of these are integers,
3 3 3
which means f (x) cannot be any of these three polynomials since f (n) must
be an integer when n is an integer. Therefore, the only possibility is that
1 1 1 x(x + 1)(2x + 1)
f (x) = x3 + x2 + x = .
3 2 6 6

We now verify that f (x) has the properties claimed in the question.
To see that f (n) is an integer for every integer n, we will show that
n(n + 1)(2n + 1), the numerator of f (n), must be a multiple of 6. Since n
and n + 1 are consecutive integers, one of them must be even. This means
n(n + 1)(2n + 1) is even. If either n or n + 1 is a multiple of 3, then
n(n + 1)(2n + 1) is a multiple of 3. If neither n nor n + 1 is a multiple of 3,
then n must be 1 more than a multiple of 3. That is, there is some integer k
so that n = 3k + 1. Then 2n + 1 = 2(3k + 1) + 1 = 6k + 3 = 3(2k + 1), so
2n + 1 is a multiple of 3. This show that n(n + 1)(2n + 1) must be a
multiple of 3. Therefore,
n(n + 1)(2n + 1)
f (n) =
6
is an integer for every integer n. You may recognize that
f (n) = 12 + 22 + 32 + · · · + n2 , which immediately implies f (n) is an integer.
1 2
Next, we will show that n3 − n − ≤ f (n) or
3 3
1 3 2 1 1 1
n − n − ≤ n3 + n2 + n
3 3 3 2 6
for all integers n with the possible exception of n = −2. After rearranging,
this inequality is equivalent to
1 7 2
0 ≤ n2 + n + .
2 6 3
Since 6 is positive, the inequality is also equivalent to
 
1 2 7 2
0≤6 n + n+ = 3n2 + 7n + 4 = (3n + 4)(n + 1).
2 6 3
The polynomial (3x + 4)(x + 1) is quadratic and has roots x = −1 and
4
x = − . The leading coefficient is positive, which means it can only take
3
4
negative values strictly between − and −1. There are no integers in this
3
range, which means (3n + 4)(n + 1) ≥ 0 for all integers n. Thus, the original
inequality also holds for all integers n including n = −2.
8
Now consider the polynomial (x + 1)(3x + 8) which has roots x = − and
3
x = −1. The only integer n for which (n + 1)(3n + 8) is negative is n = −2
8
since −2 is the only integer between − and −1. Therefore, for all integers
3
n 6= −2, we have
0 ≤ (n + 1)(3n + 8)
which we expand and divide by 6 to get
1 11 4
0 ≤ n2 + n + .
2 6 3
1
After rearranging and adding n3 to both sides, we have that
3
1 1 1 1 4
f (n) = n3 + n2 + n ≤ n3 + n2 + 2n +
3 2 6 3 3
for all integers n 6= −2. Combining this with the other inequality, we have
now shown that
1 3 2 1 4
n − n − ≤ f (n) ≤ n3 + n2 + 2n +
3 3 3 3
for all integers n 6= −2.
Finally, let’s compute f (102019 ) − f (102019 − 1). To do this, we will work out
f (n) − f (n − 1) for general n and substitute n = 102019 into the resulting
expression.
n(n + 1)(2n + 1) (n − 1)[(n − 1) + 1][2(n − 1) + 1]
f (n) − f (n − 1) = −
6 6
n[(n + 1)(2n + 1) − (n − 1)(2n − 1)]
=
6
n(2n + n + 2n + 1 − 2n2 + n + 2n − 1)
2
=
6
n(6n)
=
6
2
= n
Therefore, f (102019 ) − f (102019 − 1) = (102019 )2 = 104038 . As mentioned
earlier, the polynomial f (x) has the special property that
f (n) = 12 + 22 + 32 + · · · + n2 for every n ≥ 1. It follows from this property
that f (n) − f (n − 1) = n2 .
(a) We now present two solutions to part (a). In both solutions, we will use the
so called triangle inequality. This frequently useful fact says that if u and v
are real numbers, then
|u + v| ≤ |u| + |v|
where |x| represents the absolute value of the real number x. The triangle
inequality can be applied twice to get that |u + v + w| ≤ |u| + |v| + |w| for
any real numbers u, v, and w. If you are unfamiliar with the triangle
inequality or even with absolute values, this might be a good time for an
internet search!
Solution 1: We will prove the following fact: If
p(x) = Ax3 + Bx2 + Cx + D with A, B, C, and D real and A 6= 0, then
there are infinitely many integers n such that p(n) > 0 and infinitely many
integers m such that p(m) < 0.
1
That a = can be deduced from this fact. To see this, consider the
3
polynomial
 
1 3 2 4
q(x) = f (x) − x + x + 2x +
3 3
   
1 4
= a− x3 + (b − 1)x2 + (c − 2)x + d − .
3 3
By one of our assumptions, q(n) ≤ 0 for every integer n with the possible
exception of n = −2. This means q(n) > 0 for at most one integer. By the
1
fact above, if a − were different from 0, then there would be infinitely
3
1
many integers n with q(n) > 0. This means we must have a − = 0.
3
Interestingly, we have only used one of the two inequalities given in the
problem. To understand this, you may want to reread the hint for this
problem and think about what the inequalities say when n is negative versus
when n is positive.
To prove the fact above, set M = max{|B|, |C|, |D|}. In particular, this
means M is at least as large as each of |B|, |C|, and |D|.
If B = C = D = 0, then p(n) > 0 when n > 0 and p(m) < 0 when m < 0 or
vice versa, depending on the sign of A. For the rest of the proof, we assume
not all of B, C, and D are zero, which means M > 0.
Using the triangle inequality and the fact that 1 ≤ |n| ≤ |n|2 ≤ |n|3 for any
nonzero integer, we get for any nonzero integer n that
|Bn2 + Cn + D| ≤ |Bn2 | + |Cn| + |D|
= |B||n|2 + |C||n| + |D|
≤ M |n|2 + M |n|2 + M |n|2
= 3M |n|2 .
If u and v are real numbers with v positive, the inequality |u| ≤ v is really
saying that −v ≤ u ≤ v. Since 3M |n|2 is positive, the chain of inequalities
above implies that
−3M |n|2 ≤ Bn2 + Cn + D ≤ 3M |n|2 .
Adding An3 to this chain of inequalities gives
An3 − 3M |n|2 ≤ p(n) ≤ An3 + 3M |n|2 (∗)
for all nonzero integers n.
We will use these inequalities to show that as long as A 6= 0, there are
infinitely many integers n with p(n) > 0 and infinitely many integers m with
p(m) < 0.
3M
First, suppose A > 0. In this case, choose any positive integer n > .
A
There are infinitely many such n since M and A are constants. Noting that
3M 2
0 < n2 = |n|2 , this implies n3 > |n| . Since A > 0, we can multiply both
A
sides by A and rearrange to get 0 < An3 − 3M |n|2 . Combining with (∗),
3M
this implies p(n) > 0 for any positive n > .
A
−3M
Now choose any negative integer m < . As in the previous paragraph,
A
3M
0 < m2 = |m|2 , which implies m3 < − |m|2 , which can be rearranged to
A
Am3 + 3M |m|2 < 0. Combining with (∗), gives p(m) < 0 for any negative
−3M
integer m < , and there are infinitely many such m.
A
The cases where A < 0 are similar, establishing the fact.
1
Solution 2: We will assume that a 6= and deduce a contradiction. First,
3
1
assume a > . By rearranging the inequality
3
1 4
an3 + bn2 + cn + d ≤ n3 + n2 + 2n + ,
3 3
which holds for all integers except possibly n = −2, we get
 
1 4
a− n3 ≤ (1 − b)n2 + (2 − c)n + − d.
3 3
Multiplying through by 3 gives
(3a − 1)n3 ≤ 3(1 − b)n2 + 3(2 − c)n + 4 − 3d.
Dividing through by n3 gives
3(1 − b) 3(2 − c) (4 − 3d)
3a − 1 ≤ + + ,
n n2 n3
but we are only guaranteed that this inequality holds for positive integers n
since the original inequality may fail at n = −2, and dividing by a negative
integer n would have reversed the inequality.
For any real number u, we have u ≤ |u|, which means

3(1 − b) 3(2 − c) (4 − 3d)
3a − 1 ≤ + + .
n n2 n3
1 1 1 1
Noting that < and < for all integers n > 1, we get
n2 n n3 n

3(1 − b) 3(2 − c) (4 − 3d)
3a − 1 ≤ + +
n n2 n3
1 1 1
= |3(1 − b)| + |3(2 − c)| 2 + |(4 − 3d)| 3
n n n
1 1 1
< |3(1 − b)| + |3(2 − c)| + |(4 − 3d)|
n n n
1
= (|3(1 − b)| + |3(2 − c)| + |(4 − 3d)|)
n
and so
1
3a − 1 < (|3(1 − b)| + |3(2 − c)| + |(4 − 3d)|) (∗∗)
n
1
for every integer n > 1. Recall that a > which implies 3a − 1 > 0. If
3
|3(1 − b)| + |3(2 − c)| + |(4 − 3d)| is equal to 0, then (∗∗) says that
something positive is less than 0, which can never happen. Otherwise, the
quantity |3(1 − b)| + |3(2 − c)| + |(4 − 3d)| is some positive number, which
means that by taking n large enough, we can force
1
(|3(1 − b)| + |3(2 − c)| + |(4 − 3d)|) < 3a − 1
n
which violates (∗∗) as well. In other words, (∗∗) can only hold for finitely
1
many positive integers n. However, the assumption a > implies that (∗∗)
3
holds for all positive integers. This means it must not be the case that
1 1
a > so we conclude that a ≤ .
3 3
1
Similarly, if we assume a < , we can use the other inequality to derive a
3
contradiction. When doing this, one would need to be careful to take
n < −2 since the assumed inequality is not guaranteed to hold for n = −2.
If you have learned a bit about limits in a calculus course, you might want
to think about how this relates to the Squeeze Theorem. In fact, the Squeeze
1
Theorem can be used to give a very short proof that a = .
3
Problem of the Month
Problem 4: January 2020

In this problem, we will call a rectangular prism an appealing prism if its three
edge lengths are all integers and the length of the diagonal of each face is an
integer.
(a) Show that at least two of the three edge lengths of an appealing prism must
be multiples of 3.
(b) Show that the volume of an appealing prism must be a multiple of 1584.
(c) Find an appealing prism with shortest edge length equal to 44.
More to think about: It turns out that 44 is the smallest edge length that occurs
in an appealing prism. Can you think of a way you might prove this? Do you
think there are appealing prisms with integer-length space diagonal? A space
diagonal of a rectangular prism is a line segment connecting any two vertices that
are not on a common face. Note: there are three space diagonals and they all
have the same length.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 4: January 2020

Problem
In this problem, we will call a rectangular prism an appealing prism if its three
edge lengths are all integers and the length of the diagonal of each face is an
integer.
(a) Show that at least two of the three edge lengths of an appealing prism must
be multiples of 3.
(b) Show that the volume of an appealing prism must be a multiple of 1584.
(c) Find an appealing prism with shortest edge length equal to 44.
More to think about: It turns out that 44 is the smallest edge length that occurs
in an appealing prism. Can you think of a way you might prove this? Do you
think there are appealing prisms with integer-length space diagonal? A space
diagonal of a rectangular prism is a line segment connecting any two vertices that
are not on a common face. Note: there are three space diagonals and they all
have the same length.
Hint

(a) Examine the possible remainders after a perfect square is divided by 3.


What remainders are possible after a sum of squares is divided by 3?
(b) Factoring 1584 could provide some insight.
(c) It could be useful to label the other two edge lengths as b and c. Then there
must be integers m and n so that 442 + b2 = m2 and 442 + c2 = n2 .

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 4: January 2020

Solution
For this solution, it will be useful to have some notation involving remainders.
Given an integer n and a positive integer d, the remainder when n is divided by d
is defined to be the unique integer r in the list 0, 1, 2, . . . , d − 1 with the property
that n − r is a multiple of d. For example, the remainder when 7 is divided by 3
is 1. This is because 7 − 1 = 6 which is a multiple of 3, and 1 is the only number
among 0, 1, 2, that has this property. We will denote by remd (n) the remainder
when n is divided by d. Using this notation, the above example becomes,
rem3 (7) = 1. Here is a useful fact that will be used several times:

remd (m) + remd (n) if remd (m) + remd (n) < d
remd (m + n) =
remd (m) + remd (n) − d otherwise.
Trying to convince yourself of this fact is a good way to gain some comfort with
this notation.
(a) Suppose n is an integer that is not a multiple of 3. This means that either
rem3 (n) = 1 or rem3 (n) = 2.
If rem3 (n) = 1, then n = 3k + 1 for some integer k. Then

n2 = (3k + 1)2 = 9k 2 + 6k + 1 = 3(3k 2 + 2k) + 1,

which means rem3 (n2 ) = 1.


If rem3 (n) = 2, then there is some integer k satisfying n = 3k + 2. In this
case,
n2 = (3k + 2)2 = 3(3k 2 + 4k + 1) + 1,
which means rem3 (n2 ) = 1.
If n is a multiple of 3, then n2 is also a multiple of 3. In other words, if
rem3 (n) = 0, then rem3 (n2 ) = 0 as well. Since rem3 (n) must be either 0, 1,
or 2, we have shown for any integer n that rem3 (n2 ) = 0 when n is a
multiple of 3, and rem3 (n2 ) = 1 otherwise.
We will assume that a, b, and c are integers and are the edge lengths of a
rectangular prism. We will also assume that at least two of a, b and c are
not multiples of 3. We lose no generality by assuming that neither a nor b is
a multiple of 3. From the previous paragraph, this means rem3 (a2 ) = 1 and
rem3 (b2 ) = 1. Using the fact before the beginning of the solution to part (a),
we then have rem3 (a2 + b2 ) = 2. We showed in the beginning of this solution
that the remainder when a perfect square is divided by 3 must be either 0 or
1. Since rem3 (a2 + b2 ) = 2, a2 + b2 cannot be a perfect square. By the
Pythagorean Theorem,
√ the length of2 the 2diagonal of the face with edge
lengths a and b is a2 + b2 . Since a + b is not a perfect square, this
diagonal length is not an integer and so the prism is not appealing.
Therefore, for a rectangular prism to be appealing, at least two of its edge
lengths must be multiples of 3.
(b) We suppose a, b, and c are the edge lengths of an appealing prism and
therefore the volume of the prism is abc. By part (a), we have that at least
two of a, b, and c are multiples of 3, so the volume of the prism must be a
multiple of 9. Note that 1584 = 9 × 11 × 16 and since none of 9, 11, and 16
have any prime factors in common, it suffices to show that the volume must
be a multiple of 11 and a multiple of 16. For the former, we will show that
one of the edge lengths must be a multiple of 11. For the latter, we will
show that at least two edge lengths must be multiples of 4.
Assume that a, b, and c are the edge lengths of an appealing prism and that
none of a, b, and c is a multiple of 11. From this assumption we will deduce
a contradiction. This will allow us to conclude that at least one of the edge
lengths must be divisible by 11. Keep in mind that since the prism is
appealing, we have that a2 + b2 , a2 + c2 , and b2 + c2 are all perfect squares
by the Pythagorean Theorem.
By examining the eleven cases rem11 (n) = 0, rem11 (n) = 1, and so on up to
rem11 (n) = 10, it can be shown that if n is an integer, then rem11 (n2 ) is in
the list 0, 1, 3, 4, 5, 9. Furthermore, the only way rem11 (n2 ) = 0 is if
rem11 (n) = 0 (n is a multiple of 11).
From this, we can examine the possible values of rem11 (a2 + b2 ) for the
various values of rem11 (a2 ) and rem11 (b2 ). Remember that we are assuming
neither a nor b is a multiple of 11. The table below shows the value of
rem11 (a2 + b2 ) for every possible pair of nonzero values of rem11 (a2 ) and
rem11 (b2 ). For example, the shaded cell indicates that rem11 (a2 + b2 ) = 1
when rem11 (a2 ) = 3 and rem11 (b2 ) = 9.
rem11 (a2 )
1 3 4 5 9
1 2 4 5 6 10

rem11 (b2 )
3 4 6 7 8 1
4 5 7 8 9 2
5 6 8 9 10 3
9 10 1 2 3 7

Since a2 + b2 is a perfect square, we must have rem11 (a2 + b2 ) equal to one


of 0, 1, 3, 4, 5, 9. Looking at the table, this means rem11 (a2 ), rem11 (b2 )
must be one of:

(1, 3), (3, 1), (1, 4), (4, 1), (3, 9), (9, 3), (4, 5), (5, 4), (5, 9), (9, 5).
 
By similar reasoning, rem11 (a2 ), rem11 (c2 ) and rem11 (b2 ), rem11 (c2 )
must also be in the list above since a2 + c2 and b2 + c2 are perfect squares.
Next, we will rule out the possibility that any of rem11 (a2 ), rem11 (b2 ), and
rem11 (c2 ) is 1 or 3.
If rem11 (a2 ) = 1, then upon examination of the list, it must be the case that
rem11 (b2 ) and rem11 (c2 ) are both either 3 or 4. This would mean
rem11 (b2 ), rem11 (c2 ) is one of (3, 3), (3, 4), (4, 3), or (4, 4). None of these
pairs are in the list, so we conclude that rem11 (a2 ) 6= 1. By similar
reasoning, we also have rem11 (b2 ) 6= 1 and rem11 (c2 ) 6= 1.
If rem11 (a2 ) = 3, then rem11 (b2 ) = rem11 (c2 ) = 9 (remember, we have ruled
out the possibility that  either of these remainders is 1). This would mean
rem11 (b2 ), rem11 (c2 ) = (9, 9), which is not in the list. Therefore,
rem11 (a2 ) 6= 3, and by symmetry, rem11 (b2 ) 6= 3 and rem11 (c2 ) 6= 3.
Therefore, none of rem11 (a2 ), rem11 (b2 ), or rem11 (c2 ) can be 1 or 3, so each
of them must be in the list 4, 5, 9.
None of (4, 4), (5, 5) and (9, 9) are in the list above, so these remainders
must all be different. Without loss of generality, we can assume that
rem11 (a2 ) = 4, rem11 (b2 ) = 5, and rem11 (c2 ) = 9. This means
rem11 (a2 ), rem11 (c2 ) = (4, 9) which is not in the list. We have now run
into a problem: if a, b, and c are the edge lengths of an appealing prism and
none of a, b, and c is a multiple of 11, then there are no possible values of
rem11 (a2 ), rem11 (b2 ), and rem11 (c2 ).
Therefore, at least one of the edges lengths of an appealing prism is a
multiple of 11.
We now prove that at least two edge lengths are multiples of 4. To do this,
we first prove the following fact about Pythagorean Triples: If x, y, and z
are integers with x2 + y 2 = z 2 , then at least one of x and y is even. It can be
checked using similar analysis to part (a) that if n is an integer, then
rem4 (n2 ) = 0 if n is even and rem4 (n2 ) = 1 if n is odd. Suppose x and y are
odd integers. Then rem4 (x2 + y 2 ) = 1 + 1 = 2, which is neither 0 nor 1, so
x2 + y 2 cannot be a perfect square. Therefore, if x2 + y 2 is a perfect square,
then at least one of x and y must be even.
Since the prism is appealing, we have that a2 + b2 , a2 + c2 , and b2 + c2 are
perfect squares by the Pythagorean Theorem. The above fact then implies
that at least one of a and b is even, at least one of a and c is even, and at
least one of b and c is even. This will not happen if two of a, b, and c are
odd, so we conclude that at least two of a, b, and c are even.
p
Suppose
r  x and y are even integers with x2 + y 2 an integer. Then
x 2 y 
+ is also an integer. To see this, suppose z is a positive integer
2 2
satisfying x2 + y 2 = z 2 . Since x and y are even, then so are x2 and y 2 , so
x2 + y 2 = z 2 must also be even. The only way for this to happen is for z to
be even as well. Therefore,
r  r
x 2  y 2 z2 z
+ = =
2 2 4 2
which is an integer. It follows that if all three of a, b, and c are even, then
a b c
the prism with edge lengths , , and also has integer length diagonals, so
2 2 2
a b
it is also appealing. By what we have shown, this means at least two of , ,
c 2 2
and are even, so at least two of a, b, and c are multiples of 4.
2
We have now shown that if all three edge lengths are even, then at least two
are multiples of 4.
We still know that at least two edge lengths are even, so we now assume
exactly one of a, b, and c is odd. There is nothing special about how the
edge lengths are labelled, so we suppose without loss of generality that a is
odd and b and c are even. Suppose b is not a multiple of 4. This means
b = 2d for some odd integer d. Since a and d are both odd, there are
integers k and ` so that a = 2k + 1 and d = 2` + 1. Then

a2 + b 2 = a2 + (2d)2
= (2k + 1)2 + (4` + 2)2
= 4k 2 + 4k + 1 + 16`2 + 16` + 4
= 4[k(k + 1) + 4`2 + 4`] + 5.

Notice that the quantity k(k + 1) is the product of consecutive integers, so it


is even. Also, 4`2 + 4` is even, which means the quantity
4[k(k + 1) + 4`2 + 4`] must be a multiple of 8. Therefore, rem8 (a2 + b2 ) = 5.
It can be checked using similar reasoning to that in the earlier parts that
rem8 (n2 ) is always either 0, 1, or 4, which means a2 + b2 cannot be a perfect
square. This contradicts the fact that the prism is appealing, which means
our additional assumption that b is not a multiple of 4 must have been false.
In other words, b must be a multiple of 4. A similar argument shows that c
is a multiple of 4. Therefore, if a is odd, then b and c are both multiples of 4.
(c) Observe that all three edge lengths of an appealing prism must be different.
This is because if two edge lengths
√ √ equal to some integer n, then
were both
the diagonal length would be n2 + n2 = 2n which is not an integer.
Therefore, let us assume the edge lengths of an appealing prism are 44, b,
and c where 44 < b < c. By the Pythagorean Theorem, there must be
integers n and m with 442 + b2 = m2 and 442 + c2 = n2 . Rearranging and
factoring,
442 = m2 − b2 = (m − b)(m + b)
442 = n2 − c2 = (n − c)(n + c).
The first equation implies m − b and m + b are a divisor pair for 442 . There
are eight ways to factor 442 into a product of two positive integers:
1 × 1936, 2 × 968, 4 × 484, 8 × 242, 11 × 176, 16 × 121, 22 × 88, and
44 × 44. Also, 0 < m − b < m + b, which eliminates 44 × 44, so the pair
(m − b, m + b) must equal one of

(1, 1936), (2, 968), (4, 484), (8, 242), (11, 176), (16, 121), (22, 88).

Notice also that (m − b) + (m + b) = 2m which is even, so m − b and m + b


are either both even or both odd. This reduces the list above to

(2, 968), (4, 484), (8, 242), (22, 88).

Since
(m − b) + (m + b) (m + b) − (m − b)
m= and b = ,
2 2
if (m − b, m + b) = (2, 968), we get that m = 485 and b = 483. The other
three possibilities lead to (b, m) = (240, 244), (b, m) = (117, 125), and
(b, m) = (33, 55). Therefore, the possibilities for b are 33, 117, 240, and 483.
The same analysis applied to 442 = (n − c)(n + c) shows that c is also one of
33, 117, 240, and 483. This gives 16 possibilities for the pair (b, c). However,
we are assuming b < c and it follows from part (c) that b and c cannot both
be odd. This leads to just three possibilities for the pair (b, c), which are

(33, 240), (117, 240), (240, 483).

One can now check by hand or by calculator that 332 + 2402 = 58 689 is not
a perfect square and that 2402 + 4832 = 290 889 is not a perfect square, but
1172 + 2402 = 2672 . Therefore, there is an appealing prism with edge
lengths 44, 117 and 240. This was discovered by Paul Halcke in 1719.
Further Discussion: It can actually be verified with some effort that 44 is the
smallest edge length that can occur as the edge length of an appealing prism. For
example, it isn’t too much work to show that the shortest edge length of an
appealing prism cannot be prime. Slightly more work shows that the shortest
edge length cannot be twice a prime. This rules out many of the numbers from 1
through 43 as the shortest edge length of an appealing prism, though there are
still many cases to check in a way similar to the solution above.
Our name appealing prism was actually a disguise for the name Euler Brick. You
might want to search this on the internet. It is also a nice exercise to program a
computer to generate more Euler Bricks and help you notice other patterns about
the prime factors of their edge lengths. An Euler Brick with an integer-length
space diagonal is called a Perfect Cuboid. In fact, determining whether or not a
Perfect Cuboid exists is an open problem! That is, nobody has ever produced
one, and nobody has ever managed to prove that none exist! This is an example
of an intriguing problem in number theory that is quite easy to state, but
apparently very difficult to solve. According to Wikipedia, it has been verified
that there are no perfect cuboids having a edge length less than 5 × 1011 .
Problem of the Month
Problem 5: February 2020

(a) Suppose 0 < α < 1 is a rational number. Prove that there are positive
integers n1 < n2 < n3 < · · · < nk with the property that
1 1 1 1
α= n1 + n2 + n3 + ··· + nk .

For example, with α = 23 , we have 23 = 12 + 61 . To begin, you may want to try


to express a few specific rational numbers this way. For example, try α = 72 .
(b) Suppose 0 < α < 1 is a rational number and T is a positive integer. Prove
that there are positive integers n1 < n2 < n3 < · · · < nk each of which is
greater than T with the property that
1 1 1 1
α= n1 + n2 + n3 + ··· + nk .

For example, try writing 72 as a sum of reciprocals of distinct positive


integers all of which are greater than 5.
(c) Let α be a positive rational number. Prove that there are positive integers
n1 < n2 < n3 < · · · < nk with the property that
1 1 1 1
α= n1 + n2 + n3 + ··· + nk .

(d) The infinite series


1 + 12 + 31 + 14 + 15 + · · ·
is known as the harmonic series. It is famously true that this series does not
have a sum. More precisely, for any positive real number M , there is a
natural number n so that

1 + 12 + 13 + 41 + · · · + 1
n > M.

In other words, the sum eventually exceeds any given real number, so it
cannot equal any number. Give a proof of this fact using part (c).

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 5: February 2020

Problem

(a) Suppose 0 < α < 1 is a rational number. Prove that there are positive
integers n1 < n2 < n3 < · · · < nk with the property that
1 1 1 1
α= n1 + n2 + n3 + ··· + nk .

For example, with α = 23 , we have 23 = 12 + 61 . To begin, you may want to try


to express a few specific rational numbers this way. For example, try α = 72 .
(b) Suppose 0 < α < 1 is a rational number and T is a positive integer. Prove
that there are positive integers n1 < n2 < n3 < · · · < nk each of which is
greater than T with the property that
1 1 1 1
α= n1 + n2 + n3 + ··· + nk .

For example, try writing 72 as a sum of reciprocals of distinct positive


integers all of which are greater than 5.
(c) Let α be a positive rational number. Prove that there are positive integers
n1 < n2 < n3 < · · · < nk with the property that
1 1 1 1
α= n1 + n2 + n3 + ··· + nk .

(d) The infinite series


1 + 12 + 31 + 14 + 15 + · · ·
is known as the harmonic series. It is famously true that this series does not
have a sum. More precisely, for any positive real number M , there is a
natural number n so that

1 + 12 + 13 + 41 + · · · + 1
n > M.

In other words, the sum eventually exceeds any given real number, so it
cannot equal any number. Give a proof of this fact using part (c).
Hint

(a) It is always a good idea to work out a few examples. Try finding the largest
number of the form n1 that is less than α. Subtract this from α and notice
that the numerator of the result is smaller than that of α.
(b) Similar to part (a), you might want to find the smallest positive integer n
that is larger than T and satisfies n1 < α. Subtracting n1 from α is still a
good idea, but the numerator may not have decreased as it did in part (a).
However, if you keep doing this, the numerators will eventually start to
decrease. It may be useful that the sum of the reciprocals of the consecutive
positive integers from m + 1 to 4m is always larger than 1. Can you prove
this? For example, with m = 3, m + 1 = 4 and 4m = 12, which means the
sum
1 1 1 1 1 1 1 1 1
4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12
is larger than 1.
(c) Part (b) can be used to find many representations of 12 .

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 5: February 2020

Solution
Before answering the specific parts of this question, we will work through a few
examples to convey the spirit of the arguments presented.
In parts (a) and (b), the general idea will be to find the smallest integer n with
the property that n1 < α and then “reduce” the problem to writing the number
α − n1 as the sum of reciprocals of distinct positive integers.
As suggested in the statement of part (a), let us do this for α = 27 . You can check
that 21 and 13 are both greater than 72 , but 41 < 27 . This means 4 is the smallest
positive integer whose reciprocal is less than 27 . Thus, we compute 27 − 14 = 28 1
.
We are left with a rational number having a numerator of 1, so we can rearrange
to get
2 1 1
7 = 4 + 28 .
In the language of the problem statement, we would take n1 = 4 and n2 = 28.
The process stopped after 1 step this time, but it will generally take longer. For
13
example, consider α = 17 . This time, 12 < α so 2 is the smallest positive integer
whose reciprocal is less than 13 13 1 9
17 . We set n1 = 2 and compute 17 − 2 = 34 . Since
9 1 7 1 9 9 1 2 1
34 − 3 = − 102 is negative, 3 > 34 . On the other hand, 34 − 4 = 136 = 68 is
positive, so 14 < 34
9
. This means 4 is the smallest positive integer n satisfying
1 9
n < 34 , so we set n2 = 4. Now compute
13
17 − 12 − 1
4 = 9 1
34 − 4
2
= 136
1
= 68

which leads to
13 1
17 = 2 + 14 + 1
68 .
With n3 = 68, the process is complete after two steps. In general, this procedure
will take many steps and would be difficult or impossible to implement by hand,
but it is a nice exercise to program a computer to carry out this procedure.
In part (b), it was suggested that we write 72 as a sum of reciprocals of distinct
positive integers all of which are larger than 5. The smallest positive integer n
with the property that n1 < 27 is 4, but we only want integers greater than 5. Note
that since 14 < 27 , we also have that 51 and 16 are less than 27 , so we take n1 = 6
this time since it is the smallest positive integer whose reciprocal is less than 27
that we are allowed to use. Compute 72 − 16 = 425
. You can check that the smallest
1 5
positive integer n satisfying n < 42 is n = 9 so we take n2 = 9. It is important to
note that n2 is larger than 5 and different from n1 . Now compute
5 1 3 1
42 − 9 = 378 = 126 which has a numerator of 1, so we take n3 = 126. Thus,
2 1
7 = 6 + 91 + 1
126 .

This expression is completely different from the one previously found for 27 , which
will be important in part (c).
This type of procedure where we always take the “first thing that works” is often
called a “greedy algorithm”. The term “greedy” refers to the fact that each choice
made is the best based on the current information only; consideration is not
given to how a decision may affect later decisions. The procedures outlined above
always work (as we will show), but they do not always lead to the expression
involving the fewest terms or the smallest denominators. For example, following
19
the procedure above for 88 (and no restriction on positive integers that can be
used) leads to
19 1 1 1
88 = 5 + 63 + 27700
which is true, but a much simpler representation is
19 1 1
88 = 8 + 11 .

This illustrates a common defect of greedy algorithms. While they can often be
used to achieve what is wanted, they may not produce an optimal result. On the
other hand, greedy algorithms tend to be simple to understand and implement,
which can be advantageous if you are not concerned with optimization.
We will now proceed with part (a).
(a) We first state and prove two facts to be used in solving this problem. You
may want to ignore the proofs for now and come back to them later.
Fact 1: Suppose a and b are positive integers with 0 < ab < 1, a > 1, and a
b
in lowest terms. If n is the smallest positive integer satisfying n1 < ab , then
the numerator of ab − n1 after combining into one fraction and reducing to
lowest terms is less than a.

Proof. Since n is the smallest positive integer satisfying n1 < ab , it must be


the case that ab ≤ n−1
1
. Since ab is in lowest terms and a > 1, it is impossible
for this to be an equality, which means ab < n−1 1
. This can be rearranged to
a(n − 1) < b or an − b < a.
0 0
Choose a0 and b0 to be the positive integers satisfying ab0 = ab − n1 with ab0 in
lowest terms. The claim is that a0 < a. By finding a common denominator,
we have that
a0 an−b
b0 = bn
0
and since ab0 is in lowest terms, this means a0 ≤ an − b. We established in
the first paragraph that an − b < a, so these inequalities can be combined to
get a0 < a.

Fact 2: Suppose α is a rational number and n and m are positive integers.


If α < 1 and n is the smallest positive integer with n1 < α, and m1 ≤ α − n1 ,
then n < m.
1 1 1
Proof. Adding n to both sides of m ≤α− n gives
1 1
n + m ≤ α. (1)
Since n1 and m1 are both positive, this means m1 < α. Since n is the smallest
integer satisfying n1 < α, we must have n ≤ m. We need only rule out the
possibility that n = m. If this were the case, inequality (1) would become
1 1 2
n + n = n ≤ α. (2)
1
Since n is the smallest positive integer such that n < α, we also know that
1
α ≤ n−1 , so
2 1
n ≤ n−1 .
This can be rearranged to 2(n − 1) ≤ n or n ≤ 2. We cannot have n = 1
since our assumptions would imply 1 = n1 < α. If n = 2, we get
1 = 22 = n2 ≤ α from (2). Either way, this contradicts the assumption that
α < 1. This means m 6= n, so n < m as claimed.

We now describe a procedure to produce n1 , . . . , nk . The proof that it works


is essentially a combination of Facts 1 and 2.
We begin with a rational number α with 0 < α < 1. For notational
convenience, we label α = α1 . Now do the following
1
• Set n1 to be the smallest positive integer satisfying n1 < α1 .
• Set α2 = α1 − n11 written as a reduced fraction. If the numerator of α2 is
1, stop.
1
• Set n2 to be the smallest positive integer satisfying n2 < α2 .
• Set α3 = α2 − n12 written as a reduced fraction. If the numerator of α3 is
1, stop.
.
• ..
1
• Set ni to be the smallest positive integer satisfying ni < αi .
1
• Set αi+1 = αi − ni written as a reduced fraction. If the numerator of
αi+1 is 1, stop.
• Continue until a numerator of 1 is reached.
By Fact 1, the numerator of αi+1 = αi − n1i is smaller than the numerator of
αi . We are also choosing the ni so that the αi are positive, which means the
numerator of αk must be 1 for some k. If we set nk to be the denominator of
αk , we will have

α = α1
= n11 + α2
1 1
= n1 + n2 + α3
..
.
1 1 1 1
= n1 + n2 + n3 + ··· + nk−1 + αk
1 1 1 1 1
= n1 + n2 + n3 + ··· + nk−1 + nk .

1
For each i from 1 to k − 1, we have that ni+1 ≤ αi+1 = αi − n1i . [The
inequality will be strict for all i except i = k − 1]. By Fact 2, this means
n1 < n2 , n2 < n3 , and so on so that

n1 < n2 < n3 < · · · < nk−1 < nk .

(b) First, let us introduce some notation. For positive integers a and b with
a < b, we define S(a, b) to be the sum
1 1 1 1
S(a, b) = a + a+1 + a+2 + ··· + b−1 + 1b .

For example,
1
S(5, 9) = 5 + 16 + 71 + 81 + 19 .

Notice that if a < b < c, then S(a, c) = S(a, b) + S(b + 1, c). You might
want to check this by considering a = 5, b = 7, and c = 9 above. As well, for
convenience we define S(a, a) = a1 .
We start with a fact that is possibly of independent interest: For every
positive integer ` > 1, S(` + 1, 2`) > 12 . This follows from the fact that
1 1 1 1
`+1 > `+2 > `+3 > ··· > 2` ,

which means
1 1 1 1
S(` + 1, 2`) = `+1 + `+2 + `+3 + ··· + 2` (3)
> 2`1 + 2`1 + 2`1 + · · · + 2`1 (4)
= ` 2`1


= 12
where the sums in lines (3) and (4) have ` terms, and the inequality holds
because 2`1 is the smallest quantity in the sum in line (3).
We now let m be an arbitrary positive integer greater with m > 1. The
above fact with ` = m implies S(m + 1, 2m) > 12 , and with ` = 2m implies
S(` + 1, 2`) = S(2m + 1, 4m) > 21 .
Thus,
1 1
S(m + 1, 4m) = S(m + 1, 2m) + S(2m + 1, 4m) > 2 + 2 =1

where the first equality in the line above comes from the fact stated after
the definition of S(a, b).
We now verify the claim in the problem. To do this, first choose m to be the
1
smallest positive integer satisfying both m+1 < α and T < m + 1. [It may
seem like an odd choice to use m + 1 instead of m, but it will make the
notation a bit easier.] By our assumption and what we just showed,
1
m+1 < α < 1 < S(m + 1, 4m).
This means there is an integer r ≥ m + 1 with the property that
S(m + 1, r) < α ≤ S(m + 1, r + 1).
This is because we know the sum S(m + 1, i) exceeds α for i = 4m and
hence for all i > 4m, so we can choose r to be the largest positive integer
satisfying S(m + 1, r) < α. We set α0 = α − S(m + 1, r) which is positive by
the choice of r, and less than 1 since α is less than 1 and S(m + 1, r) is
positive.
We now apply part (a) to α0 to find integers p1 < p2 < · · · < p` satisfying
α0 = 1
p1 + 1
p2 + 1
p3 + ··· + 1
p` .

Since α0 = α − S(m + 1, r), we have that


1 1 1
 1 1 1

α = m+1 + m+2 + · · · + r + p1 + p2 + ··· + p` .

We have that m + 1 < m + 2 < · · · < r − 1 < r since they are consecutive
integers and p1 < p2 < · · · < p` from part (a). If we can show that r < p1 ,
we will be done.
By part (a), p1 was chosen to be the smallest positive integer satisfying
1 0
p1 < α . We know that

1
α ≤ S(m + 1, r + 1) = S(m + 1, r) + r+1 ,
so
1
α − S(m + 1, r) ≤ r+1
which is the same as
α0 ≤ 1
r+1 .
It follows that α0 ≤ d1 for any d ≤ r + 1, which implies p1 > r + 1 since p1
does not satisfy α0 ≤ p11 . Hence, p1 > r as claimed. We can now take the
integers n1 , n2 , . . . , nk to be the integers
m + 1, m + 2, m + 3, . . . , r, p1 , p2 , . . . , p` in that order. Here, k will be
r − m + `.
(c) Suppose α is any positive rational number. Set r = bαc, the floor of α.
Additionally, define β = α − r. That is, r is the largest integer that does not
exceed α, and 0 ≤ β < 1 is some rational number.
By part (a), if β > 0, then there are distinct positive integers whose
reciprocals sum to β. In this situation, let T be the largest of these positive
integers. If β = 0, skip this step and set T = 0.
Now use part (b) to find distinct positive integers all larger than T whose
reciprocals sum to 12 . Replace the value of T with the largest positive integer
whose reciprocal was used in this sum.
Use part (b) again to find another set of distinct positive integers all larger
than this new value of T and whose reciprocals sum to 21 . We now have
distinct positive integers whose reciprocals sum to 12 + 21 + β. Once again,
update T to be the largest integer used so far.
Repeat this process 2r − 2 more times always updating T to be the largest
positive integer used so far then applying part (b) to find new positive
integers whose reciprocals sum to 12 . The sum of the reciprocals ofthe
distinct positive integers will now be 2r copies of 21 plus β, or 2r 21 + β = α.
(d) Suppose M is a positive real number and take r to be any integer with
M < r. By part (c), there are distinct integers n1 , n2 , . . . , nk so that
1 1 1
r= n1 + n2 + ··· + nk .

Then we certainly have

r ≤ 1 + 21 + 13 + 41 + 51 + 16 + · · · + 1
nk ,

the sum of the reciprocals of the first nk positive integers. This means

M < 1 + 12 + 31 + 14 + 51 + 16 + · · · + 1
nk .
Thus, the sum
1 + 12 + 13 + 41 + 51 + 61 · · ·
eventually exceeds any given real number, so the infinite sum cannot exist.

Additional Notes:
1. A sum of reciprocals of distinct positive integers is known as an Egyptian
Fraction. You might want to do an internet search. There are lots of
interesting questions about them. For example, how do you find “optimal”
representations of rational numbers (using the smallest possible
denominators or using as few fractions as possible)?
2. A few people sent in solutions that used the following fact. For any positive
integer k, one has
1 1 1
k = k+1 + k(k+1) .
This seems like a very inviting approach for problems (a) and (b), and I do
believe it can be made to work. For example, to express 32 as a sum of
reciprocals of distinct positive integers, we could use this fact to get
2 1
3 = 3 + 13
1
= 3 + 14 + 1
3·4
1
= 3 + 14 + 1
12 .

I did consider writing a solution using this fact, but found a general
argument for the uniqueness of the positive integers to be a bit problematic.
For example suppose (relating to part (b)) one wanted to use this fact to
turn 12 + 16 + 17 + 12
1 75
= 84 into an expression for 84 75
using only integers larger
1 1 1 1
than 5. The 2 could be split into 3 + 6 . The 3 is still too small, so we would
need to split the 13 into 41 + 12
1
, then the 14 into 15 + 20
1
, and 51 into 16 + 30
1
. In
1 1
this process, we now have three copies of 6 and two copies of 12 , so the fact
has to be applied several more times. But how many more times? Splitting
1 1 1 1 1
6 into 7 + 42 gets rid of a 6 , but there is now an extra 7 and we still have an
extra copy of 16 .
My belief is that this technique can be used to solve parts (a) and (b), but it
seems like an intricate argument is needed in order to guarantee that this
process can be used to eventually lead to a sum of reciprocals of distinct
positive integers. In other words, there is a systematic way of applying this
process to make sure to get rid of all duplications. Of course, there may be a
simple argument as well. If anyone has such an argument, I would love to
see it!
Problem of the Month
Problem 6: March 2020

A point A(a, b) in chosen in the (x, y)-plane. For a point P that lies on the graph
of y = x3 , let M be the midpoint of AP . As the point P varies, so does the
midpoint M of line segment AP . In fact, as P varies, the point M traces out the
graph of another cubic equation.
(a) Find an equation for the cubic traced out by M . The coefficients of this
cubic should depend on a and b.
(b) Describe all points A(a, b) in the plane for which the traced-out cubic
intersects y = x3 in at least one but at most two distinct points.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 6: March 2020

Problem
A point A(a, b) in chosen in the (x, y)-plane. For a point P that lies on the graph
of y = x3 , let M be the midpoint of AP . As the point P varies, so does the
midpoint M of line segment AP . In fact, as P varies, the point M traces out the
graph of another cubic equation.
(a) Find an equation for the cubic traced out by M . The coefficients of this
cubic should depend on a and b.
(b) Describe all points A(a, b) in the plane for which the traced-out cubic
intersects y = x3 in at least one but at most two distinct points.

Hint

1. A typical point on the graph of y = x3 looks like (x, y) = (u, u3 ) for some
real number u. This means the coordinates of a typical point on the
traced-out cubic looks like
u + a u3 + b
 
(x, y) = , .
2 2
Can you relate x and y somehow? One approach is to assume y = f (x) for
some cubic function f (x) and try to find the coefficients. Another is to
relate x and y by eliminating u.
2. Consider the cubic obtained by subtracting the traced-out cubic from
y = x3 . What does the number of roots of this cubic tell you about the
number of points of intersection of the cubics?

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 6: March 2020

Solution

(a) Solution 1: We suppose the traced-out cubic has equation


y = Ax3 + Bx2 + Cx + D. The goal is to solve for A, B, C, and D in terms
of a and b. A point that lies on y = x3 is of the form (u, u3 ) for some real
number u. The midpoint of the line segment connecting such a point to
(a, b) is
a + u b + u3
 
,
2 2
This means, for every real number u, we must have
3 2
b + u3
   
a+u a+u a+u
=A +B +C +D
2 2 2 2
Multiplying this equation by 8 gives

4(b + u3 ) = A(a + u)3 + 2B(a + u)2 + 4C(a + u) + 8D

After expanding the expression above and collecting powers of u, we get

4b+4u3 = Au3 +(3Aa+2B)u2 +(3Aa2 +4Ba+4C)u+(Aa3 +2Ba2 +4Ca+8D)

or

0 = (A−4)u3 +(3Aa+2B)u2 +(3Aa2 +4Ba+4C)u+(Aa3 +2Ba2 +4Ca+8D−4b)

This must be true for any real number u, and the only way this can happen
is if the coefficient of each power of u is 0. Treating A, B, C, and D as
unknown values, this gives rise to the following system of equations:


 A = 4
3aA + 2B = 0

2

 3a A + 4aB + 4C = 0
 3 2
a A + 2a B + 4aC +8D = 4b
Substituting A = 4 into the second equation, we have 12a + 2B = 0 or
B = −6a. Substituting A = 4 and B = −6a into the third equation gives

12a2 + 4a(−6a) + 4C = 0
which can be solved for C in terms of a to C = 3a2 . Rearranging the last
equation and substituting the known values of A, B, and C gives
8D = 4b − 4a3 − 2a2 (−6a) − 4a(3a2 )
= 4b − 4a3 + 12a3 − 12a3
= 4b − 4a3
1
so D = (b − a3 ). Therefore, the equation of the traced-out cubic is
2
1
y = 4x3 − 6ax2 + 3a2 x + (b − a3 ).
2
Solution 2: Here is another approach that turns out to be quite a bit
shorter.
Since
a + u b + u3
 
(x, y) = , ,
2 2
a+u b + u3
we have that x = and y = . These equations are equivalent to
2 2
2x − a = u and 2y − b = u3 . Thus, we must have that
(2x − a)3 = 2y − b.
After expanding and solving for y, we get
1
y = 4x3 − 6ax2 + 3a2 x + (b − a3 )
2
as shown in Solution 1.
(b) We wish to find all pairs (a, b) so that the equation
1
x3 = 4x3 − 6ax2 + 3a2 x + (b − a3 ) has at least one and and most two
2
solutions. Rearranging the equation, our task translates into finding all pairs
1
(a, b) so that the cubic p(x) = 3x3 − 6ax2 + 3a2 x + (b − a3 ) has at least
2
one but at most two distinct real roots. Since p(x) is a cubic, it must have
at least one root, so we are really trying to determine when p(x) has fewer
than 3 distinct real roots.
1
We first suppose a = 0. In this case, p(x) = 3x3 + b, which has exactly one
r 2
−b
root which is x = 3 . Therefore, the cubics intersect in exactly one point
6
when a = 0.
From now on, we assume a 6= 0. For a cubic to have exactly two distinct real
roots, it must have a repeated root. Therefore, if p(x) has exactly two
distinct real roots, there must be distinct real numbers r and t so that
p(x) = 3(x − r)2 (x − t). Expanding 3(x − r)2 (x − t) and equating to the
known form of p(x), we get

1
3x3 − 6ax2 + 3a2 x + (b − a3 ) = 3x3 − (6r + 3t)x2 + (3r2 + 6rt)x − 3r2 t (1)
2

By equating the coefficients of x2 in (1), we get −6a = −(6r + 3t) or


6a = 6r + 3t. Squaring this equation leads to

36a2 = 36r2 + 36rt + 9t2 (2)

Equating the coefficients of x in (1), we get 3a2 = 3r2 + 6rt. Substituting


this into (2) gives 12(3r2 + 6rt) = 36r2 + 36rt + 9t2 which simplifies to
36rt = 9t2 or 4rt = t2 .
If t = 0, then the constant coefficient −3r2 t is also equal to 0, and by
1
equating constant coefficients in (1), we get that (b − a3 ) = 0 so b = a3 .
2
On the other hand, if t 6= 0, then we can divide 4rt = t2 by t to get 4r = t.
a
Substituting this into the equation 6a = 6r + 3t gives 6a = 18r or r = .
3
Equating constant coefficients in (1) again, we then get
1 3
 a 2  a  4a3
(b − a ) = −3 4 =−
2 3 3 9

3 8a3 a3
Multiplying by 2, we get b − a = − so b = .
9 9
We have shown in the case that a 6= 0 that if p(x) has exactly two distinct
3 a3
real roots, then we must have either b = a or b = .
9
3
a
Next, we will show that if b = a3 or b = , then p(x) has exactly two
9
distinct real roots, characterizing the pairs (a, b) for which p(x) has two
distinct real roots.
In the case that b = a3 ,

p(x) = 3x3 − 6ax2 + 3a2 x


= 3x(x2 − 2ax + a2 )
= 3x(x − a)2

and since a 6= 0, p(x) indeed has two distinct roots.


a3
On the other hand, if b = , we have
9
 3 
1 a
p(x) = 3x3 − 6ax2 + 3a2 x + − a3
2 9
3 2 2 4a3
= 3x − 6ax + 3a x −
9
at which point it may not be clear how to proceed. We want to show that
this polynomial has exactly two distinct roots for any choice of a 6= 0.
However, this is a polynomial involving two variables and such things are
tricky to factor by hand. Leveraging the suspicion that there should be
exactly two distinct roots, there are techniques from calculus that could help
with this factorization. In lieu of that, let’s see what happens for some
specific values of a. For example, if a = 1, then
4
p(x) = 3x3 − 6x2 + 3x − .
9
By checking for rational roots, this polynomial can be factored as
 2
1
p(x) = x − (3x − 4) .
3
You might test a few other values. For example, when a = 2, the polynomial
factors as  2
2
p(x) = x − (3x − 8)
3
and when a = 3,
p(x) = (x − 1)2 (3x − 12) .
After looking at a few examples like this, you might guess that the roots are
a 4a
and . Indeed, while it might not be easy to figure out, it is at least easy
3 3
to check for any a that
3 2 2 4a3  a 2
p(x) = 3x − 6ax + 3a x − = x− (3x − 4a),
9 3
a 4a
confirming our suspicion that p(x) has roots x = and x = .
3 3
Furthermore, since we are assuming that a 6= 0, these roots are distinct.
This confirms that p(x) has precisely two distinct real roots in the case that
a3
b= .
9
We have now shown that p(x) has exactly two distinct real roots if and only
a3
if b = a3 or b = .
9
Since polynomials of odd degree always have at least one real root, this
3 a3
means that if neither b = a nor b = is true, then p(x) has either exactly
9
one real root or three distinct real roots. To answer the question, we need to
discern, among points (a, b) satisfying neither of the two conditions above,
whether p(x) has exactly one real root or three distinct real roots.
For now, assume that a is positive. By factoring the non-constant terms of
p(x), we can write
1
p(x) = 3x(x − a)2 + (b − a3 )
2
1
Set α = (b − a3 ) so that p(x) = 3x(x − a)2 + α. The graph of
2
y = 3x(x − a)2 is shaped as follows: it is increasing from the left and passes
through the origin. It then continues to increase until it changes direction
and begins to decrease. It decreases until x = a where it is tangent to the
x-axis. At x = a, it changes direction again, increasing thereafter.
The value of α serves to translate the graph of y = 3x(x − a)2 up or down.
In the case that α = 0 which is the same as b = a3 , we have that
p(x) = 3x(x − a)2 so there are exactly two roots as we saw earlier.
Geometrically speaking, the only other way for p(x) to have exactly two
roots is if α is chosen to make the graph of p(x) tangent to the x-axis
somewhere other than at x = a. This can only be done by translating the
graph of y = 3x(x − a)2 downward so that the “bump” between x = 0 and
x = a is tangent to the x axis. By our previous work, this must happen
a3
when b = . In this situation,
9
 3 3
−4a3
  
1 1 a 1 −8a
α = (b − a3 ) = − a3 = =
2 2 9 2 9 9
Thinking again geometrically, the only way for p(x) to have three distinct
roots is for α to be strictly between 0, which corresponds to b = a3 , and
−4a3 a3
, which corresponds to b = . Since a is positive, this means p(x) has
9 9
three distinct real roots exactly when
−4a3
< α < 0.
9
We can manipulate this chain of inequalities into a more informative form:
−4a3
< α < 0
9
−4a3 1
< (b − a3 ) < 0
9 2
−8a3 < 9(b − a3 ) < 0 (Multiply through by 18)
−8a3 < 9b − 9a3 < 0
a3 < 9b < 9a3 (Add 9a3 everywhere)
a3
< b < a3 (Divide through by 9)
9

Similar analysis shows that when a < 0, p(x) has three distinct roots exactly
3 a3
when a < b < . Therefore, p(x) has three distinct roots exactly when
9
(a, b) is in the region of the plane bounded between the graphs of y = x3
1
and y = x3 , but not on either of these curves. Let us define by R the
9
1
collection of all points strictly between the curves y = x3 and y = x3 . This
9
is comprised of two regions, one in the first quadrant and one in the third
quadrant. Similarly, define by T the collection of points lying on at least one
1
of y = x3 and y = x3 , and define S to be the collection of points in neither
9
R nor T .
In the image below, the region R is in shaded, the region T is represented by
the dashed lines, and S is the rest of the plane:
1
y y = x3 y = x3
9

Since p(x) has odd degree, it will always have at least one root. This means
that y = x3 and the traced-out cubic will always intersect in at least one
point. We have now shown that they will intersect in three distinct points
exactly when (a, b) is in R. This means the two cubics will intersect in at
least one and at most two points when (a, b) is in either S or T . In fact, we
can say a little more:

(1) If (a, b) is in S, then the cubics intersect in exactly one point.


(2) If (a, b) is in T , then the cubics intersect in exactly two points. In fact,
the cubics will be tangent in this case.

Below is a plot of y = x3 (in red, passing through the origin) and


4
y = 4x3 − 6x2 + 3x − (in blue), the traced-out cubic for the point
  9
1 1
(a, b) = 1, . Note that this point lies on y = x3 and so is in T . The
9 9
intersection nearer the origin is a point of tangency of the two cubics, and
the other intersection has the two curves corssing eachother. You might
want to try graphing y = x3 and other traced-out cubics on the same set of
axes using graphing software.

x
Problem of the Month
Problem 7: April 2020

Define a function f whose input and output are both lists of n nonnegative
integers by

f (a1 , a2 , . . . , an ) = (|a1 − a2 |, |a2 − a3 |, . . . , |an−1 − an |, |an − a1 |)

where, as usual, |x| represents the absolute value of x.


For example, f (1, 2, 3, 4) = (|1 − 2|, |2 − 3|, |3 − 4|, |4 − 1|) = (1, 1, 1, 3) and
f (2, 3, 5) = (|2 − 3|, |3 − 5|, |5 − 2|) = (1, 2, 3).
We will denote by f k the function that iterates the application of f a total of k
times. For example,

f 4 (1, 1, 1, 3) = f 3 (0, 0, 2, 2) = f 2 (0, 2, 0, 2) = f (2, 2, 2, 2) = (0, 0, 0, 0).

We will call the list (a1 , a2 , . . . , an ) smooth if there is some m for which
f m (a1 , . . . , an ) is the list of n zeros. That is, a list is smooth if some number of
applications of f will result in the list of all zeros. For example, (1, 1, 1, 3) is
smooth since f 4 (1, 1, 1, 3) = (0, 0, 0, 0), as demonstrated above.

(a) Find lists of length 5 and 7 that are not smooth.


(b) Show that for all odd integers n ≥ 1 there exists a list L of length n that is
not smooth.
(c) How many smooth lists (a, b, c) are there with a, b, and c each no larger
than 100?
(d) Suppose L is a list of length 4 consisting of only zeros and ones. Show that
L is smooth.
(e) Show that all lists of length 4 are smooth.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 7: April 2020

Problem
Define a function f whose input and output are both lists of n nonnegative
integers by

f (a1 , a2 , . . . , an ) = (|a1 − a2 |, |a2 − a3 |, . . . , |an−1 − an |, |an − a1 |)

where, as usual, |x| represents the absolute value of x.


For example, f (1, 2, 3, 4) = (|1 − 2|, |2 − 3|, |3 − 4|, |4 − 1|) = (1, 1, 1, 3) and
f (2, 3, 5) = (|2 − 3|, |3 − 5|, |5 − 2|) = (1, 2, 3).
We will denote by f k the function that iterates the application of f a total of k
times. For example,

f 4 (1, 1, 1, 3) = f 3 (0, 0, 2, 2) = f 2 (0, 2, 0, 2) = f (2, 2, 2, 2) = (0, 0, 0, 0).

We will call the list (a1 , a2 , . . . , an ) smooth if there is some m for which
f m (a1 , . . . , an ) is the list of n zeros. That is, a list is smooth if some number of
applications of f will result in the list of all zeros. For example, (1, 1, 1, 3) is
smooth since f 4 (1, 1, 1, 3) = (0, 0, 0, 0), as demonstrated above.

(a) Find lists of length 5 and 7 that are not smooth.


(b) Show that for all odd integers n ≥ 1 there exists a list L of length n that is
not smooth.
(c) How many smooth lists (a, b, c) are there with a, b, and c each no larger
than 100?
(d) Suppose L is a list of length 4 consisting of only zeros and ones. Show that
L is smooth.
(e) Show that all lists of length 4 are smooth.
Hint

(a) Consider lists that only contain the integers 0 and 1.


(b) As with part (a), construct a list L so that all of its entries are either 0 or 1.
If the number of 1s in L is a positive even number, what can you say about
the number of 1s in f (L)?
(c) Supposing that L is a list of three integers, how do the parities (parity refers
to whether an integer is even or odd) of the integers in L compare to the
parities of integers in f (L)? You might want to consider what happens to
lists L with various combinations of even and odd integers. It may also be
helpful to think about how things can be simplified if the integers a, b, and c
have a common factor.
(d) There are only 16 such lists, so you could show this by checking all of them.
(e) Compute f 4 (a, b, c, d) for a few lists (a, b, c, d). What do you notice?

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 7: April 2020

Solution

(a) The list (1, 1, 0, 0, 0) is not smooth. To see this, we apply f fifteen times.
Setting L = (1, 1, 0, 0, 0), we have

f (L) = (0, 1, 0, 0, 1) f 2 (L) = (1, 1, 0, 1, 1) f 3 (L) = (0, 1, 1, 0, 0)


f 4 (L) = (1, 0, 1, 0, 0) f 5 (L) = (1, 1, 1, 0, 1) f 6 (L) = (0, 0, 1, 1, 0)
f 7 (L) = (0, 1, 0, 1, 0) f 8 (L) = (1, 1, 1, 1, 0) f 9 (L) = (0, 0, 0, 1, 1)
f 10 (L) = (0, 0, 1, 0, 1) f 11 (L) = (0, 1, 1, 1, 1) f 12 (L) = (1, 0, 0, 0, 1)
f 13 (L) = (1, 0, 0, 1, 0) f 14 (L) = (1, 0, 1, 1, 1) f 15 (L) = (1, 1, 0, 0, 0)

and so f 15 (1, 1, 0, 0, 0) = (1, 1, 0, 0, 0). This means no matter how many


times f is applied, the list of lists above will repeat every 15 applications, so
we will never arrive at the list of 5 zeros.
The list (1, 1, 0, 0, 0, 0, 0) is not smooth. Setting L = (1, 1, 0, 0, 0, 0, 0), we
have
f (L) = (0, 1, 0, 0, 0, 0, 1) f 2 (L) = (1, 1, 0, 0, 0, 1, 1)
f 3 (L) = (0, 1, 0, 0, 1, 0, 0) f 4 (L) = (1, 1, 0, 1, 1, 0, 0)
f 5 (L) = (0, 1, 1, 0, 1, 0, 1) f 6 (L) = (1, 0, 1, 1, 1, 1, 1)
f 7 (L) = (1, 1, 0, 0, 0, 0, 0)
which means f 7 (1, 1, 0, 0, 0, 0, 0) = (1, 1, 0, 0, 0, 0, 0). As with the previous
example, applying f repeatedly to (1, 1, 0, 0, 0, 0, 0) will yield the original
list every 7 applications and no list of zeros in this list of lists. Thus, the list
of 7 zeros will never appear, so (1, 1, 0, 0, 0, 0, 0) is not smooth.
(b) There are two important observations to make from part (a).
First, it appears that if every integer in a list L is either 0 or 1, then every
integer in f (L) is also either 0 or 1. Indeed, if every integer in L is either 0
or 1, then every integer in f (L) is one of |0 − 1|, |1 − 0|, |0 − 0|, or |1 − 1|,
which all simplify to either 0 or 1. We will use this observation in later parts
of this problem as well.
The second observation, which may be more of a guess, is that if L is a list
in which every integer is equal to either 0 or 1, then f (L) has an even
number of integers equal to 1.
Let us verify this property. We suppose L = (a1 , a2 , . . . , an ) is such that
ak = 0 or ak = 1 for each k. The number of entries equal to 1 in the list
f (L) is equal to the number of times that the sequence

a1 , a2 , a3 , a4 , . . . , an−2 , an−1 , an , a1

changes value. For example, if (a1 , a2 , a3 , a4 , a5 , a6 ) = (0, 0, 1, 1, 0, 1), then


the sequence above changes value going from a2 to a3 , a4 to a5 , a5 to a6 , and
a6 back to a1 . If the sequence above changed value an odd number of times,
then its first and last integers would be different. However, the sequence
starts and ends with a1 , so it must change value an even (possibly zero)
number of times. Hence, f (L) has an even number of integers equal to 1.
We now suppose n is odd with n ≥ 3 and that L = (a1 , a2 , . . . , an ) is a list
of nonnegative integers having the following three properties:
(i) For every k, either ak = 0 or ak = 1.
(ii) There are an even number of indices k with ak = 1.
(iii) ak = 1 for at least one k.
We will show that f (L) = (b1 , b2 , . . . , bn ) also satisfies properties (i), (ii),
and (iii) (with “a” replaced by “b”).
Since L satisfies property (i), the two observations made to start this
solution imply that f (L) satisfies properties (i) and (ii). To see that f (L)
satisfies property (iii), first observe that n is odd, so properties (i) and (ii) of
L imply that there are an odd number of k for which ak = 0. In particular,
this means the number of k for which ak = 0 is not 0, so there is at least one
integer in L that is equal to 0. Since L has at least one 0 and at least one 1
(by property (iii) of L), it must “change” values at some point. This will give
rise to at least one 1 in f (L). Therefore, f (L) satisfies condition (iii).
Let n be an odd positive integer and consider the list L = (a1 , a2 , . . . , an )
where a1 = a2 = 1 and ak = 0 for k ≥ 3. Then L has properties (i), (ii), and
(iii), so by the above reasoning, f (L) has properties (i), (ii), and (iii). In
turn, this implies f 2 (L) has properties (i), (ii), (iii), and so on. That is,
f m (L) has properties (i), (ii), and (iii) for all m ≥ 0. Property (iii) ensures
that f m (L) has at least one integer that does not equal 0, so this means
f m (L) is not the list of zeros for any m. Therefore, L is not smooth.
(c) We will show that a list (a, b, c) is smooth exactly when a = b = c. Since
each of a, b, and c is between 1 and 100 inclusive, this will give a total of
100 smooth lists.
Notice that if a = b = c, then f (a, b, c) = (0, 0, 0), so (a, b, c) is smooth.
What needs to be verified is that if (a, b, c) is smooth, then a = b = c.
To start, we will establish a seemingly much less ambitious claim: If (a, b, c)
is smooth, then a, b, and c have the same parity. That is, a, b, and c are
either all even or all odd. (The parity of a number refers to whether it is
even or odd.)
To establish this claim, we will assume that a, b, and c do not all have the
same parity and deduce that (a, b, c) is not smooth.
Suppose a, b, and c are nonnegative integers at least one of which is even
and at least one of which is odd. Consider the list

f (a, b, c) = (|a − b|, |b − c|, |c − a|).

Since there are three integers in the list (a, b, c), at least two of a, b, and c
must have the same parity (are both even or both odd). This means at least
one of the integers in f (a, b, c) is even. On the other hand, we are assuming
at least two of a, b, and c have different parity (one is even and one is odd),
so this means f (a, b, c) has at least one odd integer. It follows that if (a, b, c)
has at least one even integer and at least one odd integer, then f m (a, b, c)
has this property for every m ≥ 1. This means f m (a, b, c) is never equal to
(0, 0, 0), so (a, b, c) cannot be smooth.
We now know that if (a, b, c) is smooth, then a, b, and c have the same
parity. Since the difference between two integers of the same parity is even,
this actually implies that if (a, b, c) is smooth, then the integers in f (a, b, c)
are all even. This will be important in finishing the argument, but we also
need the following fact that allows for a sort of “reduction” in a smooth list
having a common factor among its integers.
Fact: Suppose a1 , a2 , . . . , an are nonnegative integers with a common factor
r > 0. Then thelist (a1 , a2 , . . . , an ) is smooth if and only if the list
 a1 a2 an
, ,..., is smooth.
r r r
Suppose f (a1 , a2 , . . . , an ) = (b1 , b2 , . . . , bn ). By the definition of f , this
means
(b1 , b2 , . . . , bn ) = (|a1 − a2 |, |a2 − a3 |, . . . , |an − a1 |)
Using properties of absolute values and that r > 0, we have
a a an   a
1 a2 a2 a3
a
n a1

1 2
f , ,..., = − , − ,..., −
r r r  r r r r r r
|a1 − a2 | |a2 − a3 | |an − a1 |
= , ,...,
r r r
 
b1 b2 bn
= , ,...,
r r r
In words, dividing each integer in a list by a common factor and then
applying f has the same effect as applying f and then dividing each integer
in the resulting list by that same common factor. Applying this fact
repeatedly, it follows that if for some m ≥ 1 we have
f m (a1 , a2 , . . . , am ) = (c1 , c2 , . . . , cn ), then
m a1 a2 an   c 1 c 2 cn 

f , ,..., = , ,...,
r r r r r r
ck
Since r 6= 0, ck = 0 if and only if = 0, and this is true for any 1 ≤ k ≤ n.
r
This means f m (a1 ,a2 , . . . , an ) is the list of all zeros if and only if
a1 a2 an
fm , ,..., is the list of all zeros. This completes the proof of the
r r r
fact.
We established earlier that if (a, b, c) is smooth, then the integers in f (a, b, c)
are all even. To use the above fact, we need a way of keeping track of the
number of common factors of 2 there are among the integers in f (a, b, c).
To help with this, define a function E on the nonzero integers by E(a) = r
where r is the largest power of 2 that is a divisor of a. For example,
E(n) = 1 for any odd number n since 20 = 1 is the largest power of 2 that
divides any odd number. Another example is E(12) = 4 since 4 is a divisor
of 12, but 8 is not and neither is any higher power of 2. Here are three
features of the function E that we will use. Their proofs are left as an
exercise.
a
(F1) is an odd integer.
E(a)
a
(F2) If r is a power of 2 and is an odd integer, then r = E(a).
r
(F3) E(a) = E(−a) = E(|a|)
Suppose L = (a, b, c) is smooth and that a, b, and care all even
 and not all
a b c
0. We let r = min{E(a), E(b), E(c)} and set K = , , . If some of a,
r r r
b, and c are 0, then some of E(a), E(b), and E(c) are undefined. In this
situation, r is the minimum of the values that are defined.
a b c
Because of how r is chosen, we will have that , , and are all integers.
r r r
Also, since r = E(a) or r = E(b) or r = E(c), at least one integer in K
must be odd. We are assuming that L is smooth, so the fact proved on the
previous page implies that K is smooth as well. Thus, K is a smooth list
with at least one odd integer, which means all three of the integers in K
must be odd by the “less ambitious” claim from earlier. By F2 above, this
means E(a) = E(b) = E(c). We have established the following: If (a, b, c) is
smooth with a, b, and c all even and not all 0, then E(a) = E(b) = E(c).
Next, suppose L = (a, b, c) is smooth and that a, b, and c are all odd. We
want to prove that a = c. To do this, we will suppose a 6= c and deduce a
contradiction. Since a, b, and c are all odd, f (L) = (|a − b|, |b − c|, |c − a|)
has all even integers and since a 6= c, |c − a| =
6 0. As well, L is smooth, so
f (L) is smooth. From the previous paragraph, this means
E(|a − b|) = E(|b − c|) = E(|c − a|). By F3 above,
a−b
E(a − b) = E(b − c) = E(c − a). Let this common value be r. Then
r
b−c a−b b−c
and are both odd by F1, so + = 2m for some integer m.
r r r
Then
a−c a−b b−c
= + = 2m
r r r
and so a − c = 2rm. Therefore, 2r is a divisor of a − c. Since r is a power of
2, so is 2r, and this means E(a − c) ≥ 2r > r. However, E(a − c) = r, so
this is a contradiction. This can only mean that our additional assumption
that a 6= c must have been false, which means a = c. By a similar argument,
it can be shown that b = c, so a = b = c.
We have now established the following: If (a, b, c) is smooth with a, b, and c
all odd, then a = b = c.
We now return to (and finish) the case when (a, b, c) is smooth with a, b,
and c all even.
Suppose again that (a, b, c) is smooth and that a, b, and c are all even. If
a = b = c = 0, then there is nothing to prove. Otherwise, weknow 
a b c a b c
E(a) = E(b) = E(c) = r, so , , and are all odd. Since , , is
r r r r r r
a b c
also smooth, = = , from which it follows that a = b = c.
r r r
Therefore, if (a, b, c) is smooth, then a = b = c.
(d) You may be getting the idea that keeping track of the parity of the elements
in a list is of great importance in this problem. In the previous part, we
showed that if (a, b, c) is smooth, then the integers in f (a, b, c) are all even.
The critical observation of this and the next part is that if a, b, c, and d are
any positive integers, then there is some m for which the integers in
f m (a, b, c, d) are all even. If you are familiar with modular arithmetic, you
may be able to streamline most of the upcoming work. However, this
solution will not assume any such knowledge.
For a list (a1 , a2 , . . . , an ) of nonnegative integers, define

g(a1 , a2 , . . . , an ) = (a1 + a2 , a2 + a3 , a3 + a4 , · · · , an−1 + an , an + a1 )

For m ≥ 2, we define g m in a way similar to f m .


The function g looks similar to f , but it lacks absolute values and involves
addition rather than subtraction. While g and f are genuinely different
functions, g can be used to keep track of the parity of the integers in lists
produced by applying f . More precisely, suppose (a1 , a2 , . . . , an ) and
(b1 , b2 , . . . , bn ) are lists of nonnegative integers with the property that for
each 1 ≤ k ≤ n, ak and bk have the same parity. If we set
f (a1 , a2 , . . . , an ) = (c1 , c2 , . . . , cn ) and g(b1 , b2 , . . . , bn ) = (d1 , d2 , . . . , dn ),
then for each k with 1 ≤ k ≤ n, ck and dk have the same parity as well. To
see this, observe that for k ≤ n, we have ck = |ak − ak+1 | and dk = bk + bk+1
(where we take the convention that an+1 = a1 and bn+1 = b1 ). If
ck = ak − ak+1 , then ck + dk = (ak + bk ) − (ak+1 − bk+1 ). By the
assumptions on (a1 , a2 , . . . , an ) and (b1 , b2 , . . . , bn ), ak + bk and ak+1 − bk+1
are both even, so ck + dk is even. This means ck and dk must have the same
parity. Similarly, if ck = ak+1 − ak , then ck and dk have the same parity.
The above paragraph shows that the integers in g(a1 , a2 , . . . , an ) have the
same parities as the corresponding integers in f (a1 , a2 , . . . , an ). Applying
the fact again, we have that the integers in g 2 (a1 , a2 , . . . , an ) have the same
parities as the corresponding integers in f 2 (a1 , a2 , . . . , an ). This can be
repeated to get that the integers in g m (a1 , a2 , . . . , an ) have the same parities
as the corresponding integers in f m (a1 , a2 , . . . , an ) for all m ≥ 2.
We can use this to prove that the integers in f 4 (a, b, c, d) are all even for any
nonnegative integers a, b, c, and d. Consider an arbitrary list (a, b, c, d) of
four nonnegative integers and compute g 4 (a, b, c, d):

g 4 (a, b, c, d)
=g 3 (a + b, b + c, c + d, d + a)
=g 2 (a + 2b + c, b + 2c + d, c + 2d + a, d + 2a + b)
=g(a + 3b + 3c + d, b + 3c + 3d + a, c + 3d + 3a + b, d + 3a + 3b + c)

which is equal to

(2a + 4b + 6c + 4d, 2b + 4c + 6d + 4a, 2c + 4d + 6a + 4b, 2d + 4a + 6b + 4c).

While this could be seen as a bit of a mess, the important thing to notice is
that every integer in g 4 (a, b, c, d) is even. By the discussion above, this
means every integer in f 4 (a, b, c, d) is even. Finally, recall from part (b) that
if a, b, c, and d are all either 0 or 1, then every integer in f 4 (a, b, c, d) is
either 0 or 1. Hence, every integer in f 4 (a, b, c, d) must be equal to 0 since 1
is odd. That is, f 4 (a, b, c, d) = (0, 0, 0, 0), so (a, b, c, d) is smooth!
(e) We can solve this problem by putting together several ideas that have come
up in previous parts.
This proof is formalizing the following idea, which can be observed if you
apply f repeatedly to an arbitrary list of four positive integers: After at
most four applications, all numbers in the resulting list will have a common
factor of 2. As well, the largest integer in the resulting list will be no larger
than the largest integer in the original list. Using the fact in part (c), the
common factor of 2 can be divided out and we will have “reduced” to a list
whose largest integer is strictly smaller than the largest integer in the
original list. Applying f at most four more times, we can “reduce” again.
Eventually, the integers in the list will have a common factor so large that
when it is factored out, the remaining integers are all either 0 or 1. At this
point, part (d) can be applied.
As mentioned, the final observation we will need is that for a list L of
nonnegative integers, the largest integer in f (L) is no larger than the largest
integer in L. In other words, the largest integer in f (L) could be the same
as the largest integer in L, but it cannot be bigger.
This is because the largest integer in f (a1 , a2 , . . . , an ) is equal to the largest
difference between two adjacent integers in (a1 , a2 , . . . , an ) (where a1 and an
are considered adjacent). The largest difference that can possibly occur
between adjacent integers in L is equal to the largest integer in L. This
occurs if a 0 happens to be adjacent to an occurrence of the largest integer
in L. In this case, the largest integer in f (L) will be equal to the largest
integer in L. Otherwise, the largest integer in f (L) is strictly smaller than
the largest integer in L.
We now suppose (a, b, c, d) is a list of nonnegative integers that is not
smooth. We will derive a contradiction from this assumption, thereby
proving that all lists of four nonnegative integers are smooth.
If (a, b, c, d) is not smooth, then f 4 (a, b, c, d) is not smooth either. From
part (d), f 4 (a, b, c, d) consists of only even integers, say
f 4 (a, b, c, d) = (2a0 , 2b0 , 2c0 , 2d0 ). By the fact in part (c), (a0 , b0 , c0 , d0 ) is
smooth if and only if (2a0 , 2b0 , 2c0 , 2d0 ) is smooth, and so (a0 , b0 , c0 , d0 ) is not
smooth since (2a0 , 2b0 , 2c0 , 2d0 ) is not smooth. We also know that the largest
integer among a, b, c, d is at least as large as the largest integer among
2a0 , 2b0 , 2c0 , 2d0 . This means the largest integer in (a, b, c, d) is strictly larger
than the largest of a0 , b0 , c0 , d0 .
We have shown that if there is a list (a, b, c, d) of nonnegative integers that
fails to be smooth, then there is a list (a0 , b0 , c0 , d0 ) that fails to be smooth
and its largest integer is smaller than the largest integer in (a, b, c, d). This
fact can be applied to (a0 , b0 , c0 , d0 ) to get another list (a00 , b00 , c00 , d00 ) that fails
to be smooth but has a smaller largest integer than (a0 , b0 , c0 , d0 ). Since the
largest integer in these lists keeps getting smaller, we must eventually get a
list whose largest integer is 1 and is not smooth. In part (d), we showed that
no such list exists. This gives the contradiction we sought.
In other words, every list (a, b, c, d) of four nonnegative integers is smooth.
Problem of the Month
Problem 8: May 2020

For this problem, the radius of a square will be the distance from its centre to
any of its four vertices. A lattice point is a point (a, b) in the plane where a and b
are both integers.

(a) A square of radius 26 is placed in a random orientation with its centre at
the origin. Two possible ways the square could be placed are pictured below.
In Figure 1, there are five lattice points inside the square. In Figure 2, there
is only one lattice point inside the square.

Figure 1 Figure 2

What is the probability that there are exactly 5 lattice points inside the
square? For this and later parts of this problem, we will take the convention
that a point on the perimeter of the square is inside the square.
Define a function f on the positive real numbers so that f (r) is the largest
possible number of lattice points inside any square of radius r centred at the
origin.
√ 
(b) Show that f 26 = 5.

(c) Show that f (r) is always one more than a multiple of 4.


(d) Find the smallest positive real number r with the property that f (r) = 17.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Problem 8: May 2020

Problem
For this problem, the radius of a square will be the distance from its centre to
any of its four vertices. A lattice point is a point (a, b) in the plane where a and b
are both integers.

(a) A square of radius 26 is placed in a random orientation with its centre at
the origin. Two possible ways the square could be placed are pictured below.
In Figure 1, there are five lattice points inside the square. In Figure 2, there
is only one lattice point inside the square.

Figure 1 Figure 2

What is the probability that there are exactly five lattice points inside the
square? For this and later parts of this problem, we will take the convention
that a point on the perimeter of the square is inside the square.
Define a function f on the positive real numbers so that f (r) is the largest
possible number of lattice points inside any square of radius r centred at the
origin.
√ 
(b) Show that f 26 = 5.

(c) Show that f (r) is always 1 more than a multiple of 4.


(d) Find the smallest positive real number r with the property that f (r) = 17.
Hint

(a) You will√ need to know which lattice points can possibly be inside

a square of
radius 26 . Try to determine all lattice points that are within 26 units of the
origin.
To give an idea of how to compute the probability, we include a discussion
on what is meant by “random” in this problem. Suppose one of the four
midpoints of the sides is marked as our “favourite midpoint”. If the square is
centred at the origin, the orientation of the square is determined by where
our favourite midpoint is. In particular, the orientation is determined by the
angle made by the positive x-axis and the ray from the origin to our
favourite midpoint. The possible orientations of the square correspond to
the possible values of this angle between 0◦ and 360◦ . Thinking in this way,
the probability, for example, that this angle is between 50◦ and 70◦ is
70◦ −50◦ 1 ◦ ◦ ◦
360◦ = 18 . In words, the 20 range between 50 and 70 accounts for one
eighteenth of the possible orientations of the square. With all of this in
mind, it may be useful to determine for which angles lattice points can lie on
the sides of the square.
(b) The first sentence of the hint for part (a) is also a hint for part (b).
(c) Think about the rotational symmetry of the square and the lattice points in
the plane. Think about why a square centred at the origin has 90◦ rotational
symmetry about the origin, regardless of the orientation of the square.
(d) Try to draw a square centred at the origin that has exactly 17 lattice points
inside it. Next, try to do this so that the square is as small as possible.

Webpage: cemc.uwaterloo.ca/resources/potm.php Email: potm@uwaterloo.ca


Problem of the Month
Solution to Problem 8: May 2020

Solution
Throughout this solution, we will refer to the lattice points closest to the origin.
By
√ the Pythagorean theorem, the distance from the √ point (a, b) to the origin is
a2 + b2 . If a and b are both integers, the smallest √ a2 + b2 can be is 0, occurring
exactly when a = b = 0. The next smallest that a2 + b2 can be is 1, and this
occurs when one of a and b is ±1 and the other is 0. Thus, there are four lattice
points at a distance of 1 from the origin, and they are (−1, 0), (0, −1), (0, 1), and
(1,
√ 0). We will refer to the set of these four √ points as S. The next smallest that
2 2
a + b can be when a and b are integers is 2, and this occurs at the four points
(−1, −1) (−1, 1), (1, −1), and (1, 1). We will call this set of points T . Continuing

in this way, the table below catalogues the lattice points no more than 8 units
from the origin and names certain sets of four of these points.
√ Approximate
d= a2 + b 2 Possible pairs (a, b)
value of d
0 0 (0, 0)
√1 1 (−1, 0), (0, −1), (0, 1), (1, 0) S
2 1.4142 (−1, −1), (−1, 1), (1, −1), (1, 1) T
2 2 (−2, 0), (0, −2), (0, 2), (2, 0) U
√ (−2, 1), (−1, −2), (1, 2), (2, −1) V
5 2.2361
√ (−2, −1), (−1, 2), (1, −2), (2, 1) W
8 2.8284 (−2, −2), (−2, 2), (2, −2), (2, 2) X
Table 1

In part (d), we will use a geometric notion called convexity. A polygon in the plane
is called convex if for every pair of points inside the polygon, the line segment
connecting these two points is entirely inside the polygon. Another way to think
of this is that every point inside a convex polygon can “see” every other point.
For example, a square is convex because if any two points inside a square are joined
by a line segment, the entire line segment will be inside the square. In fact, all
regular polygons are convex. Here is a fact we will need later: Suppose P and Q
are convex polygons and that the perimeter of P is entirely inside Q. Then all of
P lies inside Q.
(a) In general, a square of radius r centred at the origin is completely inside the
circle of radius r centred at the origin. Thus, a point that is inside a square of
radius r centred at the origin must also be inside the circle of radius r centred
√ be more than r units from the origin. Using
at the origin, and hence, cannot
Table 1 and observing that 26 ≈ 1.225, this means the only lattice points
that
√ are close enough to the origin to possibly be inside a square of radius
6
2 centred at the origin are the five points (0, 0), (−1, 0), (0, −1),

(0, 1), and
(1, 0). Thus, if there are five points inside a square of radius 26 centred at
the origin, the points must be the origin and the points in S (Table 1).
We will first discuss how to find the probability that (1, 0) is inside the square.
Next, we will discuss how this probability is equal to the probability that there
are five points inside the square, and finally, we will compute the probability.
To determine the probability that (1, 0) is inside the square, we consider the
following four diagrams showing the square in various positions. In all four
diagrams, the shaded quadrant represents the same quadrant of the square.
The angles α and β are in degrees.

Diagram 1 Diagram 2

Diagram 3 Diagram 4

In Diagram 1, the sides of the square are parallel/perpendicular to the axes


so that the midpoints of the four sides lie on the axes. In Diagram 2, the
square has been rotated an angle of α counterclockwise so that (1, 0) lies on
the perimeter of the square. In Diagram 3, the square has been rotated a bit
more in the counterclockwise direction so that (1, 0) is in the interior of the
square. In Diagram 4, the square has been rotated a total angle of β > α
counterclockwise so that (1, 0) lies on the perimeter again. From the position
where the square is rotated α to the position where it is rotated β, the point
(1, 0) is inside the square, and in fact, is inside the shaded region. This means
the angle through which we can rotate the square so that (1, 0) is inside the
shaded region has a measure of β − α.
Therefore, the probability that (1, 0) is inside the shaded region is β−α
360◦ since

360 represents one complete rotation of the square around the origin, during
which the square will be in every possible position.
By symmetry, the probability that (1, 0) is in each of the other three quadrants
of the square is the same, so the probability that (1, 0) is inside the square is
4(β−α) β−α
360◦ = 90◦ .

Notice that in Diagrams 2 and 4 above, not only is (1, 0) on the perimeter
of the square, all four points in S appear to be on the perimeter. As well,
in Diagram 3, all four points in S are inside the square. This is due to the
90◦ -rotational symmetry of both the square and the points in S. In other
words, it is impossible to have (1, 0) inside the square without having all four
points in S inside the square. You may want to spend some time thinking
about this idea. The origin is always inside the square, so the probability that
there are five lattice points inside the square is equal to the probability that
(1, 0) is inside the square.
Thus, to compute the probability that there are five lattice points inside the
square, we will compute the difference β − α and divide by 90◦ .
The picture to the right is the right side of Diagram
2 with several points labelled.
Since O is at the centre of the square and A is the
midpoint of a side of the square, the shaded region is
a square. This means AO = AC and ∠CAO = 90◦ .
By the Pythagorean theorem, AO2 + AC 2 = OC 2

  2
6 6
so 2AO2 = 2 = 4 which simplifies to AO2 = 43 .

3
Since AO > 0, this means AO = 2 .
We have that OB = 1√ since B has coordinates (1, 0). Since ∠BAO = 90◦ ,
cos ∠AOB = BOAO
= 23 . Since α < 90◦ , this implies α = 30◦ . A similar
calculation in Diagram 4 shows that the angle 90◦ − β = 30◦ , so β = 60◦ .
Thus, β − α = 60◦ − 30◦ = 30◦ . From the calculation above, this means the

probability that there are five points inside the square is 30 1
90◦ = 3 .

(b) From the beginning



of the solution to part
 √ (a),
 there are only five lattice
points within 26 units of the origin, so f 26 ≤ 5. Moreover, it is possible

6
for a square
 of radius 2 centred at the
 origin to have five lattice
  points inside
√ √  √
6 6 6
it, so f 2 ≥ 5. Together with f 2 ≤ 5, we have f 2 = 5.
(c) Consider the rotational symmetry mentioned in the solution to part (a). Re-
gardless of the position of the square, if it is rotated 90◦ about the origin,
it will land perfectly on top of itself. This means if a point (a, b) is inside
the square, then the point (−b, a) obtained by rotating (a, b) by 90◦ counter-
clockwise will also be inside the square. Similarly, (−a, −b) and (b, −a) will
be inside the square.
We consider the lattice points other than the origin as being broken into sets
of four points. Each set of four points consists of a lattice point together with
the three other lattice points that can be obtained by rotating it about the
origin by a multiple of 90◦ . The sets S, T , U , V , W , and X labelled in Table
1 are examples of such sets of four points.
As discussed above, if we consider such a set of four points and any square
centred at the origin, either all four points are inside the square or none of
the four points are inside the square. Thus, the lattice points inside any
square centred at the origin are the origin and some number (possibly zero)
of complete sets of four points.
This means the number of lattice points inside any square centred at the
origin is 1 more than a multiple of 4. It follows that f (r) must be 1 more
than a multiple of 4.

(d) The answer is r = 4 510 . To show this, we need to verify that f (r) = 17 and
that if c < r, then f (c) 6= 17. The latter will be done by showing that if
f (c) = 17, then c ≥ r.
First, we will show that f (r) = 17. Consider the quadrilateral in Diagram 5
obtained by intersecting the lines through the pairs of points (−2, 1) and
(0, 2), (1, 2) and (2, 0), (2, −1) and (0, −2), and (−1, −2) and (−2, 0).
The sides of the quadrilateral have slopes 21 and −2 which means opposite
sides are parallel and adjacent sides are perpendicular, so the quadrilateral
is a rectangle. The rectangle has 90◦ rotational symmetry since the points
defining its sides do. Thus, the rectangle is a
square centred at the origin. To find its radius,
we first find the coordinates of one of its vertices.
The vertex in the first quadrant is the intersection
of the line through (−2, 1) and (0, 2) and the line
through (1, 2) and (2, 0). These lines have equa-
tions y = 21 x + 2 and y = −2x + 4, respectively,
and intersect at 45 , 12
5 . The radius of the square
is the distance from this point to the origin, which
Diagram 5
is
q  q √ √
4 2 12 2 16 144 √160 = 4 10

5 + 5 = 25 + 25 = 25 5 = r.

Using the eight points defining the perimeter of the square and the convexity
property from the first page of the solution, it isn’t hard to verify that the 17
lattice points appearing to be inside the square (see Diagram 5) are indeed
inside the square. This means f (r) ≥ 17.

Since r ≈ 2.53 which is less than 8 ≈ 2.828, the data in Table 1 implies
f (r) ≤ 21 since there are only 21 lattice points within r units of the origin.
From part (c), f (r) must be one more than a multiple of 4, which implies
f (r) = 17 or f (r) = 21. We will now rule out the possibility that f (r) = 21.
As noted above, there are only 21 lattice points within r units of the origin,
which means that if f (r) = 21, then there is some square of radius r centred
at the origin that contains all 21 of these lattice points. Consider the irregular

octagon obtained by connecting the lattice points at a distance of 5 or 2
from the origin, as shown in Diagram 6.
Suppose f (r) = 21. Then there must be a
square of radius r containing the points defining
the perimeter of this octagon. Since squares are
convex, the entire perimeter of the octagon must
be contained in the square. Since the octagon in
Diagram 6 is convex (think about this), the fact
before the solution to part (a) implies the entire
octagon is inside the square.
However, it is easily checked that the area of the
Diagram 6
octagon is 14 units squared and the area of a
square of radius r is 2r2 = 2(16)(10)
25 = 645 = 12.8 units squared. Thus, the
area of the octagon is larger than that of a square of radius r, so the octagon
cannot be completely inside the square. Therefore, f (r) 6= 21, so f (r) = 17.
We will now show that if c < r, then f (c) 6= 17. This is equivalent to showing
that if f (c) = 17, then c ≥ r. Together with f (r) = 17, this means r is the
smallest real number satisfying f (r) = 17.
We now assume that c is a real number with f (c) = 17. This means there
is a square of radius c centred at the origin that has exactly 17 lattice points
inside it. From this, we will deduce that c ≥ r.
Showing that c ≥ r is equivalent to showing that c is not less than r. To do
this, we assume that c ≤ r and deduce that c = r. You may want to consider
the logic of this approach for a moment before reading on. Thus, we are now
assuming that c ≤ r and that there is a square of radius c centred at the
origin with 17 lattice points inside it. From this, we will deduce that c = r.

Since c ≤ r < 8, the 17 lattice points inside
√ the square of radius c must be
among the 21 lattice points closer than 8 units to the origin. This means
the 17 points inside the square must be comprised of the origin and some of
the complete sets S, T , U , V , and W . If all points in V and W are inside the
square, then the octagon from Diagram 6 is inside the square, which would
mean c > r by the previous argument. This means we cannot include both
sets V and W . Since there are 17 lattice points inside the square, all points
from S, T , and U are inside the square, as well as the points from exactly
one of V and W . We assume that the 17 lattice points inside the square are
the origin and those in the sets S, T , U , and V . If we replace V by W , the
argument is similar.
In particular, the eight points defining the perime-
ter of the irregular octagon in Diagram 7 must all
be inside the square. This octagon is convex, which
means it is completely inside the square. Given the
shape and position of this octagon, it seems rea-
sonable that the smallest square containing it is
the one in Diagram 5. To confirm this, it will be
useful to find a point on the perimeter of this oc-
tagon at a minimum distance from the origin. By
Diagram 7
rotational symmetry, one such point will be either
on the line segment L connecting (−1, −2) to (−2, 0) or M connecting (−2, 0)
to (−2, 1). The segment L lies on the line with equation y = −2x − 4, which
means a point on this segment takes the form (x, −2x − 4). The distance
from such a point to the origin is
p p q 2
x2 + (−2x − 4)2 = 5x2 + 16x + 16 = 5 x + 58 + 16 5.

This quantity is minimized when the positive quantity inside the radical is
8 2
= 0 or x = − 58 . The distance

minimized, and this happens when 5 x + 5
q √
is 0 + 16 = √4 = 4 5 .
5 5 5

On the other hand, a point on the vertical segment M has the form (−2, y)
for some y and has distance from the origin equal to
p p
(−2)2 + y 2 = 4 + y 2

which is minimized
√ when y = 0. The distance when y = 0 is 4 = 2 which
4 5
is larger than 5 ≈ 1.7889. Therefore, among points on the perimeter √
of the
octagon in Diagram 7, the closest to the origin is at a distance of 4 5 5 .
We now consider a line segment connecting the origin to the midpoint of a
side of the square. An application of the Pythagorean theorem shows that
the length of this segment is √c2 . Since the octagon is completely inside the
square, this line segment must intersect the perimeter of the octagon at some
point. Therefore, if we let d be the distance from this point to the origin, we
have d ≤ √c2 . As shown above, the closest point anywhere on the perimeter

4 5
of the octagon to the origin is at a distance of 5 , which means

4 5 √c
5 ≤d≤ 2

from which it follows that


√ √ √
4 10 4 5 2
r= 5 = 5 ≤c

4 10
where the inequality comes from rearranging ≤ √c2 . Together with our
5
assumption that c ≤ r, we have that c = r, which is what we set out to show.
Therefore, any square containing 17 lattice points has a radius greater than
or equal to r, which means r is the smallest real number with f (r) = 17.

You might also like