How many positive integers less than 1000 have only odd digits?
Determine all ordered pairs that satisfy the following system of equations.
Problem 256
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 where and are digits.
There are five possibilities for each of and (since each must be odd).
Therefore, there are two-digit positive integers with only odd digits.
Consider the three-digit positive integers with only odd digits.
Such an integer has the form where , and are digits.
There are five possibilities for each of , and (since each must be odd).
Therefore, there are three-digit positive integers with only odd digits.
In total, there are positive integers less than 1000 with only odd digits.
Combining the two terms on the right side of the second equation, we obtain .
Since , then or .
Therefore, we have and .
From the first equation, .
Substituting into the second equation, we obtain or , which gives .
Factoring, we obtain .
Therefore, or .
If , then .
If , then .
Therefore, the two solutions are .
(We note that since , then both of these pairs are actually solutions to the original system of equations.)