0% found this document useful (0 votes)
154 views12 pages

2018 Fermat Solution

O Ogfbj

Uploaded by

jonasz2864
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views12 pages

2018 Fermat Solution

O Ogfbj

Uploaded by

jonasz2864
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

The CENTRE for EDUCATION

in MATHEMATICS and COMPUTING


cemc.uwaterloo.ca

2018 Fermat Contest


(Grade 11)

Tuesday, February 27, 2018


(in North America and South America)

Wednesday, February 28, 2018


(outside of North America and South America)

Solutions

©2017 University of Waterloo


2018 Fermat Contest Solutions Page 2

1. Evaluating,

2016 − 2017 + 2018 − 2019 + 2020 = 2016 + (2018 − 2017) + (2020 − 2019)
= 2016 + 1 + 1
= 2018
Answer: (D)

2. Since the maximum temperature was 14◦ C and the minimum temperature was −11◦ C, then
the range of temperatures was 14◦ C − (−11◦ C) = 25◦ C.
Answer: (B)

3. The expression (3x + 2y) − (3x − 2y) is equal to 3x + 2y − 3x + 2y which equals 4y.
When x = −2 and y = −1, this equals 4(−1) or −4.
Answer: (A)

4. The fraction 57 is between 0 and 1.


The fraction 28
3
is equivalent to 9 13 and so is between 9 and 10.
Therefore, the integers between these two fractions are 1, 2, 3, 4, 5, 6, 7, 8, 9, of which there are 9.
Answer: (B)

5. If ♥ = 1, then ∇ = ♥ × ♥ × ♥ = 1 × 1 × 1 = 1, which is not possible since ∇ and ♥ must be


different positive integers.
If ♥ = 2, then ∇ = ♥ × ♥ × ♥ = 2 × 2 × 2 = 8, which is possible.
If ♥ = 3, then ∇ = ♥ × ♥ × ♥ = 3 × 3 × 3 = 27, which is not possible since ∇ is less than 20.
If ♥ is greater than 3, then ∇ will be greater than 27 and so ♥ cannot be greater than 3.
Thus, ♥ = 2 and so ∇ = 8.
This means that ∇ × ∇ = 8 × 8 = 64.
Answer: (D)

6. Since ∠QRT = 158◦ , then ∠QRP = 180◦ − ∠QRT = 180◦ − 158◦ = 22◦ .
Since ∠P RS = ∠QRS and ∠QRP = ∠P RS +∠QRS, then ∠QRS = 12 ∠QRP = 12 (22◦ ) = 11◦ .
Since 4QSR is right-angled at Q, then ∠QSR = 180◦ − 90◦ − ∠QRS = 90◦ − 11◦ = 79◦ .
Answer: (E)

7. Since Bev has driven 312 km and still has 858 km left to drive, the distance from Waterloo to
Marathon is 312 km + 858 km = 1170 km.
The halfway point of the drive is 12 (1170 km) = 585 km from Waterloo.
To reach this point, she still needs to drive 585 km − 312 km = 273 km.
Answer: (B)

8. A line segment joining two points is parallel to the x-axis exactly when the y-coordinates of
the two points are equal.
Here, this means that 2k + 1 = 4k − 5 and so 6 = 2k or k = 3.
(We can check that when k = 3, the coordinates of the points are (3, 7) and (8, 7).)
Answer: (A)
2018 Fermat Contest Solutions Page 3
180
9. Since the area of rectangle P QRS is 180 and SR = 15, then P S = = 12.
15
Since P S = 12 and U S = 4, then P U = P S − U S = 12 − 4 = 8.
Since 4P U T is right-angled at U , then by the Pythagorean Theorem,
√ √ √
T U = P T 2 − P U 2 = 102 − 82 = 36 = 6

since T U > 0.
In 4P T S, we can consider base P S and height T U .
Therefore, its area is 12 (P S)(T U ) = 12 (12)(6) = 36.
Answer: (B)

10. For any real number x not equal to 0, x2 > 0.


Since −1 < x < 0, then x2 < (−1)2 = 1, and so 0 < x2 < 1.
Of the given points, only C is between 0 and 1.
Answer: (C)

11. Since 56 of the balls are white and the remainder of the balls are red, then 61 of the balls are red.
Since the 8 red balls represent 16 of the total number of balls and 56 = 5 · 16 , then the number of
white balls is 5 · 8 = 40.
Answer: (C)

12. There is 1 square that is 1 × 1 that contains the shaded square (namely, the square itself).
There are 4 squares of each of the sizes 2 × 2, 3 × 3 and 4 × 4 that contain the shaded square.

Finally, there is 1 square that is 5 × 5 that contains the shaded square (namely, the 5 × 5 grid
itself).
In total, there are thus 1 + 4 + 4 + 4 + 1 = 14 squares that contain the shaded 1 × 1 square.
Answer: (E)

13. We would like to find the first time after 4:56 where the digits are consecutive digits in increasing
order.
It would make sense to try 5:67, but this is not a valid time.
Similarly, the time cannot start with 6, 7, 8 or 9.
No time starting with 10 or 11 starts with consecutive increasing digits.
Starting with 12, we obtain the time 12:34. This is the first such time.
We need to determine the length of time between 4:56 and 12:34.
From 4:56 to 11:56 is 7 hours, or 7 × 60 = 420 minutes.
From 11:56 to 12:00 is 4 minutes.
From 12:00 to 12:34 is 34 minutes.
Therefore, from 4:56 to 12:34 is 420 + 4 + 34 = 458 minutes.
Answer: (A)
2018 Fermat Contest Solutions Page 4

14. The line with equation y = x has slope 1 and passes through (0, 0).
When this line is translated, its slope does not change.
When this line is translated 3 units to the right and 2 units down, every point on the line is
translated 3 units to the right and 2 units down. Thus, the point (0, 0) moves to (3, −2).
Therefore, the new line has slope 1 and passes through (3, −2).
Thus, its equation is y − (−2) = 1(x − 3) or y + 2 = x − 3 or y = x − 5.
The y-intercept of this line is −5.
Answer: (C)

15. Each entry in the grid must be a divisor of the product of the numbers in its row and the
product of the numbers in its column.

56

135

N 48
21 108 160

Only two of the products are multiples of 5, namely 160 and 135.
This means that the 5 must go in the second row and third column.
135
From this, we can see that the product of the other two numbers in the second row is = 27.
5
Since all of the entries are between 1 and 9, then the remaining two numbers in this row must
be 3 and 9.
Since 9 is not a divisor of 21, then 9 must be in the middle column.
108
This means that the product of the remaining numbers in the middle column is = 12.
9
This means that the remaining digits in the middle column are 3 and 4, or 2 and 6. (These are
the only factor pairs of 12 from the list of possible entries.)
Since 3 already occurs in the second row, then the entries in the second column must be 2 and 6.
Since 6 is not a divisor of 56, then 6 cannot go in the first row.
This means that 6 goes in the third row and so N = 6.
We can complete the grid as follows:

7 2 4 56

3 9 5 135

1 6 8 48
21 108 160
Answer: (D)
2018 Fermat Contest Solutions Page 5

16. Solution 1
If point R is placed so that P Q = QR = P R, then the resulting 4P QR is equilateral.
Since points P and Q are fixed, then there are two possible equilateral triangles with P Q as a
side – one on each side of P Q.

R1

P Q

R2

One way to see this is to recognize that there are two possible lines through P that make an
angle of 60◦ with P Q.

Solution 2
Consider the line segment P Q. Draw a circle with centre P that passes through Q and a circle
with centre Q that passes through P .

R1

P Q

R2

Suppose that the point R satisfies P Q = QR = P R.


Since P Q = QR, then P and R are the same distance from Q, so R lies on the circle with
centre Q that passes through P .
Since P Q = P R, then R lies on the circle with centre P that passes through Q.
In other words, point R is on both circles in the diagram.
Since these two circles intersect in exactly two points, then there are two possible locations for
R.
Answer: (C)
2018 Fermat Contest Solutions Page 6

17. The side length of the square is 2 and M and N are midpoints of sides.
Thus, SM = M R = QN = N R = 1. √ √ √
Using the Pythagorean Theorem in 4P SM , we get P M = P S 2 + SM 2 = 22 + 12 = 5
since P M > 0. √
Similarly, P N = 5. √ √ √
Using the Pythagorean Theorem in 4M N R, we get M N = M R2 + N R2 = 12 + 12 = 2
since M N > 0.
Using the cosine law in 4P M N , we get

M N 2 = P M 2 + P N 2 − 2(P M )(P N ) cos(∠M P N )


√ √
2 = 5 + 5 − 2( 5)( 5) cos(∠M P N )
2 = 10 − 10 cos(∠M P N )
10 cos(∠M P N ) = 8
8
cos(∠M P N ) = 10 = 45
Answer: (A)
p √ √
18. Suppose that 7 + 48 = m + n.√ √ 2
Squaring both√ 2sides, we obtain
√ 7 + 48 = (m +√ n) . √
2
Since (m + n) = m + 2m n + n, then 7 + 48 = √ (m2 +
√ n) + 2m n.
Let’s make the assumption that m2 + n = 7 and 2m n = 48.
Squaring both sides of the second equation, we obtain 4m2 n = 48 or m2 n = 12.
So we have m2 + n = 7 and m2 n = 12.
By inspection, we might see that m = 2 and n = 3 is a solution.
If we didn’t see this by inspection, we could note that n = 7 − m2 and so m2 (7 − m2 ) = 12 or
m4 − 7m2 + 12 = 0.
Factoring, we get (m2 − 3)(m2 − 4) = 0.
Since m is an integer, then m2 6= 3.
Thus, m2 = 4 which gives m = ±2. Since m is a positive integer, then m = 2.
When m = 2, we get n = 7 − m2 = 3.
Therefore, m = 2 and √ n = 3, which
√ gives m2 + n2√= 13. √ √ √
We note that m + n = 2 + 3 and that (2 + 3)2 = 4 + 4 3 + 3 = 7 + 4 3 = 7 + 48,
as required. This means that, while the assumption we made at the beginning was not fully
general, it did give us an answer to the problem.
Answer: (E)

19. Solution 1
Over the first 3 minutes of the race, Peter ran 48 m farther than Radford. Here is why:

We note that at a time of 0 minutes, Radford was at the 30 m mark.


If Radford ran d m over these 3 minutes, then he will be at the (d + 30) m mark after
3 minutes.
Since Peter is 18 m ahead of Radford after 3 minutes, then Peter is at the (d+30+18)
m mark.
This means that, in 3 minutes, Peter ran (d + 48) m which is 48 m farther than
Radford’s d m.
48 m
Since each runs at a constant speed, then Peter runs = 16 m/min faster than Radford.
3 min
Since Peter finishes the race after 7 minutes, then Peter runs for another 4 minutes.
2018 Fermat Contest Solutions Page 7

Over these 4 minutes, he runs (4 min) · (16 m/min) = 64 m farther than Radford.
After 3 minutes, Peter was 18 m ahead of Radford.
Therefore, after 7 minutes, Peter is 18 m + 64 m = 82 m farther ahead than Radford, and so
Radford is 82 m from the finish line.

Solution 2
As in Solution 1, suppose that Radford ran d m over the first 3 minutes and so Peter runs
(d + 48) m over these first 3 minutes.
Since Peter’s speed is constant, he runs 43 (d + 48) m over the next 4 minutes.
Since Radford’s speed is constant, he runs 43 d over these next 4 minutes.
This means that Peter runs a total of (d + 48) m + 34 (d + 48) m = 73 (d + 48) m.
Also, Radford is (30 + d + 34 d) m from the start after 7 minutes, since he had a 30 m head start.
Thus, Radford’s distance from the finish line, in metres, is
7
3
(d + 48) − (30 + d + 43 d) = 73 d + 112 − 30 − d − 43 d = 82
Answer: (D)

20. We count the positive integers x for which the product

(x − 2)(x − 4)(x − 6) · · · (x − 2016)(x − 2018) (∗)

equals 0 and is less than 0 separately.


The product (∗) equals 0 exactly when one of the factors equals 0.
This occurs exactly when x equals one of 2, 4, 6, . . . , 2016, 2018.
These are the even integers from 2 to 2018, inclusive, and there are 2018
2
= 1009 such integers.
The product (∗) is less than 0 exactly when none of its factors is 0 and an odd number of its
factors are negative.
We note further that for every integer x we have

x − 2 > x − 4 > x − 6 > · · · > x − 2016 > x − 2018

When x = 1, we have x − 2 = −1 and so all 1009 factors are negative, making (∗) negative.
When x = 3, we have x − 2 = 1, x − 4 = −1 and all of the other factors are negative, giving
1008 negative factors and so a positive product.
When x = 5, we have x − 2 = 3, x − 4 = 1 and x − 6 = −1 and all of the other factors are
negative, giving 1007 negative factors and so a negative product.
This pattern continues giving a negative value for (∗) for x = 1, 5, 9, 13, . . . , 2013, 2017.
There are 1 + 2017−1
4
= 505 such values (starting at 1, these occur every 4 integers).
When x ≥ 2019, each factor is positive and so (∗) is positive.
Therefore, there are 1009 + 505 = 1514 positive integers x for which the product (∗) is less than
or equal to 0.
We should further justify the pattern that we found above.
Suppose that x = 4n + 1 for n = 0, 1, 2, . . . , 504. (These are the integers 1, 5, 9, 13, . . . , 2017.)
Then (∗) becomes

(4n − 1)(4n − 3)(4n − 5) · · · (4n − 2015)(4n − 2017)

The 2kth factor is (n − (4k − 1)) and so when n = 4k, this factor is positive and the next factor
is negative.
In other words, when n = 2k, the first 2k of these factors are positive and the remaining factors
2018 Fermat Contest Solutions Page 8

are negative.
In other words, when n = 2k, there is an even number of positive factors.
Since the total number of factors is 1009, which is odd, then the number of negative factors is
odd and so the product is negative.
In a similar way, we can show that if x = 4n + 3 for n = 0, 1, 2, . . . , 503 (these are the integers
3, 7, 11, . . . , 2011, 2015), then the product is positive.
This confirms that this pattern continues.
Answer: (C)

21. Substituting n = 1 into the equation an+1 = an + an+2 − 1 gives a2 = a1 + a3 − 1.


Since a1 = x and a3 = y, then a2 = x + y − 1.
Rearranging the given equation, we obtain an+2 = an+1 − an + 1 for each n ≥ 1.
Thus,

a4 = a3 − a2 + 1 = y − (x + y − 1) + 1 = 2 − x
a5 = a4 − a3 + 1 = (2 − x) − y + 1 = 3 − x − y
a6 = a5 − a4 + 1 = (3 − x − y) − (2 − x) + 1 = 2 − y
a7 = a6 − a5 + 1 = (2 − y) − (3 − x − y) + 1 = x
a8 = a7 − a6 + 1 = x − (2 − y) + 1 = x + y − 1

Since a7 = a1 and a8 = a2 and each term in the sequence depends only on the previous two
terms, then the sequence repeats each 6 terms.
(For example, a9 = a8 − a7 + 1 = a2 − a1 + 1 = a3 and so on.)
Now

a1 + a2 + a3 + a4 + a5 + a6 = x + (x + y − 1) + y + (2 − x) + (3 − x − y) + (2 − y) = 6

which means that the sum of each successive group of 6 terms is also equal to 6.
We note that 2016 = 6 · 336 and so the 2016th term is the end of a group of 6 terms, which
means that the sum of the first 2016 terms in the sequence is 6 · 336 = 2016.
Finally, a2017 = a1 = x and a2018 = a2 = x + y − 1.
Thus, the sum of the first 2018 terms is 2016 + x + (x + y − 1) = 2x + y + 2015.
Answer: (E)

22. First, we find the coordinates of the points P and Q in terms of k by finding the points of
intersection of the graphs with equations y = x2 and y = 3kx + 4k 2 .
Equating values of y, we obtain x2 = 3kx + 4k 2 or x2 − 3kx − 4k 2 = 0.
We rewrite the left side as x2 − 4kx + kx + (−4k)(k) = 0 which allows us to factor and obtain
(x − 4k)(x + k) = 0 and so x = 4k or x = −k.
Since k > 0, P is in the second quadrant and Q is in the first quadrant, then P has x-coordinate
−k (which is negative).
Since P lies on y = x2 , then its y-coordinate is (−k)2 = k 2 and so the coordinates of P are
(−k, k 2 ).
Since Q lies on y = x2 and has x-coordinate 4k, then its y-coordinate is (4k)2 = 16k 2 and so
the coordinates of Q are (4k, 16k 2 ).
Our next step is to determine the area of 4OP Q in terms of k.
Since the area of 4OP Q is numerically equal to 80, this will give us an equation for k which
will allow us to find the slope of the line.
To find the area of 4OP Q in terms of k, we drop perpendiculars from P and Q to S and T ,
respectively, on the x-axis.
2018 Fermat Contest Solutions Page 9
y

P
x
S O T

The area of 4OP Q is equal to the area of trapezoid P ST Q minus the areas of 4P SO and
4QT O.
Trapezoid P ST Q has parallel bases SP and T Q and perpendicular height ST .
Since the coordinates of P are (−k, k 2 ), then SP = k 2 .
Since the coordinates of Q are (4k, 16k 2 ), then T Q = 16k 2 .
Also, ST = 4k − (−k) = 5k.
Thus, the area of trapezoid P ST Q is 21 (SP + T Q)(ST ) = 12 (k 2 + 16k 2 )(5k) = 85
2
k3.
4P SO is right-angled at S and so has area 21 (SP )(SO) = 12 (k 2 )(0 − (−k)) = 12 k 3 .
4QT O is right-angled at T and so has area 21 (T Q)(T O) = 12 (16k 2 )(4k − 0) = 32k 3 .
Combining these, the area of 4P OQ equals 85 2
k 3 − 21 k 3 − 32k 3 = 10k 3 .
Since this area equals 80, then 10k 3 = 80 or k 3 = 8 and so k = 2.
This means that the slope of the line is 3k which equals 6.
Answer: (D)

23. We are told that (x − a)(x − 6) + 3 = (x + b)(x + c) for all real numbers x.
In particular, this equation holds when x = 6.
Substituting x = 6 gives (6 − a)(6 − 6) + 3 = (6 + b)(6 + c) or 3 = (6 + b)(6 + c).
Since b and c are integers, then 6 + b and 6 + c are integers, which means that 6 + b is a divisor
of 3.
Therefore, the possible values of 6 + b are 3, 1, −1, −3.
These yield values for b of −3, −5, −7, −9.
We need to confirm that each of these values for b gives integer values for a and c.
If b = −3, then 6 + b = 3. The equation 3 = (6 + b)(6 + c) tells us that 6 + c = 1 and so c = −5.
When b = −3 and c = −5, the original equation becomes (x − a)(x − 6) + 3 = (x − 3)(x − 5).
Expanding the right side gives (x−a)(x−6)+3 = x2 −8x+15 and so (x−a)(x−6) = x2 −8x+12.
The quadratic x2 − 8x + 12 factors as (x − 2)(x − 6) and so a = 2 and this equation is an identity
that is true for all real numbers x.
Similarly, if b = −5, then c = −3 and a = 2. (This is because b and c are interchangeable in
the original equation.)
Also, if b = −7, then c = −9 and we can check that a = 10.
Similarly, if b = −9, then c = −7 and a = 10.
Therefore, the possible values of b are b = −3, −5, −7, −9.
The sum of these values is (−3) + (−5) + (−7) + (−9) = −24.
Answer: (B)
2018 Fermat Contest Solutions Page 10

24. We use the notation “a/b/c” to mean a pucks in one bucket, b pucks in a second bucket, and c
pucks in the third bucket, ignoring the order of the buckets.
Yellow buckets
1/0/0: With 1 puck to distribute, the distribution will always be 1/0/0.
Blue buckets
Since there are 2 pucks to distribute amongst the three buckets, then there is a total of 32 = 9
ways of doing this. (There are 3 possibilities for each of 2 pucks.)
2/0/0: There are 3 ways in which the 2 pucks end up in the same bucket (1 way for each of
the 3 buckets). The probability of this is 39 .
1/1/0: Thus, there are 9 − 3 = 6 ways in which the 2 pucks are distributed with 1 puck in each
of two buckets and 0 pucks in the third bucket. The probability of this is 69 .
Red buckets
With 3 pucks to distribute amongst 3 buckets, there is a total of 33 = 27 ways.
3/0/0: There are 3 ways in which the 3 pucks end up in the same bucket (1 way for each of
3
the 3 buckets). The probability of this is 27 .
1/1/1: There are 3 · 2 · 1 = 6 ways in which the 3 pucks end up with one in each bucket (3
choices of bucket for the first puck, 2 for the second, and 1 for the third). The probability of
6
this is 27 .
2/1/0: Thus, there are 27 − 3 − 6 = 18 ways in which the 2 pucks are distributed with 2 pucks
18
in 1 bucket, 1 puck in 1 bucket, and 0 pucks in 1 bucket. The probability of this is 27 .
Green buckets
With 4 pucks to distribute amongst 3 buckets, there is a total of 34 = 81 ways.
4/0/0: There are 3 ways in which the 4 pucks end up in the same bucket (1 way for each of
3
the 3 buckets). The probability of this is 81 .
3/1/0: There are 4 × 3 × 2 = 24 ways in which the pucks end up with 3 in one bucket and 1 in
another (4 ways to choose a puck to be on its own, 3 ways to choose the bucket for this puck,
and 2 ways to choose the bucket for the 3 pucks). The probability of this is 24
81
.
2/1/1: There are 6 ways of choosing two of the four pucks. (If they are labelled W, X, Y, Z,
then we can choose WX, WY, WZ, XY, XZ, or YZ.) There are 6 × 3 × 2 = 36 ways in which
the pucks can be distributed with 2 pucks in one bucket and 1 puck in each of the remaining
buckets (6 ways to choose the 2 pucks that go together, 3 ways to choose the bucket, and 2 ways
in which the remaining 2 pucks can be assigned to the remaining 2 buckets). The probability
of this is 36
81
.
2/2/0: Thus, there are 81 − 3 − 24 − 36 = 18 ways in which the 4 pucks are distributed with 2
pucks in each of 2 buckets. The probability of this is 18
81
.
For a green bucket to contain more pucks than each of the other 11 buckets, the following
possible distributions exist with probabilities as shown:
Green Red Blue Yellow Probability
3 3
4/0/0 (p = 81
) Any (p = 1) Any (p = 1) Any (p = 1) 81
24 3 24 24
3/1/0 (p = 81
) Any but 3/0/0 (p = 1 − 27
) Any (p = 1) Any (p = 1) ·
81 27
36 6
2/1/1 (p = 81
) 1/1/1 (p = 27 ) 1/1/0 (p = 96 ) Any (p = 1) 36
· 6 ·6
81 27 9

A 2/2/0 distribution of pucks among green buckets cannot satisfy the desired conditions because
there would be not be a single green bucket with more pucks in it than any other bucket, as
there would be two green buckets containing the same number of pucks.
3
Therefore, the overall probability is 81 + 24 · 24 + 81
81 27
36 6 6 1
· 27 · 9 = 27 8 8
+ 27 · 9 + 49 · 29 · 23 = 243
9 64
+ 243 16
+ 243 89
= 243 .
Answer: (B)
2018 Fermat Contest Solutions Page 11

25. Suppose that D is a digit and k is a positive integer. Then

| ·{z
D(k) = DD · · DD} = D · 11 · · 11} = D · 19 · 99
| ·{z · · 99} = D · 19 · (100
| ·{z · · 00} −1) = D · 19 · (10k − 1)
| ·{z
k times k times k times k times

Therefore, the following equations are equivalent:


2
P(2k) − Q(k) = R(k)
2
P · 19 · (102k − 1) − Q · 91 · (10k − 1) = R · 19 · (10k − 1)
P · 19 · (102k − 1) − Q · 91 · (10k − 1) = R2 · 1
81
· (10k − 1)2
9P · (102k − 1) − 9Q · (10k − 1) = R2 · (10k − 1)2
9P · (10k − 1)(10k + 1) − 9Q · (10k − 1) = R2 · (10k − 1)2
9P · (10k + 1) − 9Q = R2 · (10k − 1) (since 10k − 1 6= 0)
9P · 10k + 9K − 9Q = R2 · 10k − R2
9P − 9Q + R2 = 10k (R2 − 9P )

We consider three cases: 3 ≤ k ≤ 2018, k = 1, and k = 2.


Case 1: 3 ≤ k ≤ 2018
Suppose that R2 − 9P 6= 0.
Since k ≥ 3, then 10k (R2 −9P ) > 1000 if R2 −9P > 0 and 10k (R2 −9P ) < −1000 if R2 −9P < 0.
Since P, Q, R are digits, then 9P − 9Q + R2 is at most 9(9) − 9(0) + 92 = 162 and 9P − 9Q + R2
is at least 9(0) − 9(9) + 02 = −81.
This means that if R2 − 9P 6= 0, we cannot have 9P − 9Q + R2 = 10k (R2 − 9P ) since the
possible values do not overlap.
So if 3 ≤ k ≤ 2018, we must have R2 − 9P = 0 and so 9P − 9Q + R2 = 0.
If R2 = 9P , then R2 is a multiple of 3 and so R is a multiple of 3.
Since R is a positive digit, then R = 3 or R = 6 or R = 9.
If R = 3, then 9P = R2 = 9 and so P = 1.
Since 9P − 9Q + R2 = 0, then 9Q = 9(1) + 9 = 18 and so Q = 2.
If R = 6, then 9P = R2 = 36 and so P = 4.
Since 9P − 9Q + R2 = 0, then 9Q = 9(4) + 36 = 72 and so Q = 8.
If R = 9, then 9P = R2 = 81 and so P = 9.
Since 9P − 9Q + R2 = 0, then 9Q = 9(9) + 81 = 162 and so Q cannot be a digit.
Therefore, in the case where 3 ≤ k ≤ 2018, we obtain the quadruples (P, Q, R, k) = (1, 2, 3, k)
and (P, Q, R, k) = (4, 8, 9, k).
Since there are 2018−3+1 = 2016 possible values of k, then we have 2·2016 = 4032 quadruples
so far.
Case 2: k = 1
Here, the equation 9P − 9Q + R2 = 10k (R2 − 9P ) becomes 9P − 9Q + R2 = 10R2 − 90P or
99P = 9R2 + 9Q or 11P = R2 + Q.
For each possible value of P from 1 to 9, we determine the possible values of Q and R by
looking for perfect squares that are at most 9 less than 11P .
P = 1: Here, 11P = 11 which is close to squares 4 and 9. We obtain (R, Q) = (2, 7), (3, 2).
P = 2: Here, 11P = 22 which is close to the square 16. We obtain (R, Q) = (4, 6).
P = 3: Here, 11P = 33 which is close to the square 25. We obtain (R, Q) = (5, 8).
P = 4: Here, 11P = 44 which is close to the square 36. We obtain (R, Q) = (6, 8).
P = 5: Here, 11P = 55 which is close to the square 49. We obtain (R, Q) = (7, 6).
2018 Fermat Contest Solutions Page 12

P = 6: Here, 11P = 66 which is close to the square 64. We obtain (R, Q) = (8, 2).
P = 7: There are no perfect squares between 68 and 76, inclusive.
P = 8: Here, 11P = 88 which is close to the square 81. We obtain (R, Q) = (9, 7).
P = 9: There are no perfect squares between 90 and 98, inclusive.
Since k = 1 in each of these cases, we obtain an additional 8 quadruples.
Case 3: k = 2
Here, the equation 9P − 9Q + R2 = 10k (R2 − 9P ) becomes 9P − 9Q + R2 = 100R2 − 900P or
909P = 99R2 + 9Q or 101P = 11R2 + Q.
As P ranges from 1 to 9, the possible values of 101P are 101, 202, 303, 404, 505, 606, 707, 808, 909.
As R ranges from 1 to 9, the possible values of 11R2 are 11, 44, 99, 176, 275, 396, 539, 704, 891.
The pairs of integers in the first and second lists that differ by at most 9 are

(i) 101 and 99 (which give (P, Q, R) = (1, 2, 3)),


(ii) 404 and 396 (which give (P, Q, R) = (4, 8, 6)), and
(iii) 707 and 704 (which give (P, Q, R) = (7, 3, 8)).

Since k = 2 in each of these cases, we obtain an additional 3 quadruples.


In total, there are thus N = 4032 + 8 + 3 = 4043 quadruples.
The sum of the digits of N is 4 + 0 + 4 + 3 = 11.
Answer: (C)

You might also like