Maths Olympiad Prep

Track / Stage 2 / 16 of 240 #256 of 2444

Problem 256

Combinatorics Difficulty 2.1 Prove it CEMC Euclid · Canada · 2013

How many positive integers less than 1000 have only odd digits?
Determine all ordered pairs (a,b)(a,b) that satisfy the following system of equations. a+b=1647=1a+1b\begin{aligned} a+b&=16\\ \dfrac{4}{7}&=\dfrac{1}{a}+\dfrac{1}{b}\end{aligned}

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

There are five odd digits: 1, 3, 5, 7, 9.

We consider the positive integers less than 1000 in three sets: those with one digit, those with two digits, and those with three digits.

There are 5 positive one-digit integers with one odd digit (namely 1, 3, 5, 7, 9).

Consider the two-digit positive integers with only odd digits.

Such an integer has the form XYXY where XX and YY are digits.

There are five possibilities for each of XX and YY (since each must be odd).

Therefore, there are 5×5=255\times 5 = 25 two-digit positive integers with only odd digits.

Consider the three-digit positive integers with only odd digits.

Such an integer has the form XYZXYZ where XX, YY and ZZ are digits.

There are five possibilities for each of XX, YY and ZZ (since each must be odd).

Therefore, there are 5×5×5=1255\times 5 \times 5= 125 three-digit positive integers with only odd digits.

In total, there are 5+25+125=1555+25+125=155 positive integers less than 1000 with only odd digits.
Combining the two terms on the right side of the second equation, we obtain 47=b+aab\dfrac{4}{7} = \dfrac{b+a}{ab}.

Since a+b=16a+b=16, then 47=16ab\dfrac{4}{7} = \dfrac{16}{ab} or ab=16(7)4=28ab = \dfrac{16(7)}{4}=28.

Therefore, we have a+b=16a+b=16 and ab=28ab=28.

From the first equation, b=16ab=16-a.

Substituting into the second equation, we obtain a(16a)=28a(16-a)=28 or 16aa2=2816a-a^2=28, which gives a216a+28=0a^2-16a+28=0.

Factoring, we obtain (a14)(a2)=0(a-14)(a-2)=0.

Therefore, a=14a=14 or a=2a=2.

If a=14a=14, then b=16a=2b=16-a=2.

If a=2a=2, then b=16a=14b=16-a=14.

Therefore, the two solutions are (a,b)=(14,2),(2,14)(a,b)=(14,2),(2,14).

(We note that since 12+114=714+114=814=47\dfrac{1}{2}+\dfrac{1}{14}=\dfrac{7}{14}+\dfrac{1}{14} = \dfrac{8}{14}=\dfrac{4}{7}, then both of these pairs are actually solutions to the original system of equations.)

Source: CEMC, University of Waterloo, licensed CC-BY-NC-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.