Maths Olympiad Prep

Library / /20 of 21

Algebra Difficulty 6.6 National Olympiad Prove it Italy

Problem:

Let k1k \geq 1 be a natural number. Determine, as a function of kk, the number of positive integers nn with the following properties:

a. in base ten they are written with kk digits, all odd;

b. they are divisible by 55, and the quotient n5\frac{n}{5}, written in base ten, still has kk digits, all odd.

Solutions — 2

Solution 1

Solution:

The number of positive integers nn with properties (a) and (b) is 3k13^{k-1}.

To prove this, consider the integer n5\frac{n}{5} and let a0,a1,,ak1a_{0}, a_{1}, \ldots, a_{k-1} be its digits, that is
n5=ak110k1++a110+a0 \frac{n}{5}=a_{k-1} 10^{k-1}+\ldots+a_{1} 10+a_{0}
By (b) the digits aia_{i} are all odd, that is ai{1,3,5,7,9}a_{i} \in\{1,3,5,7,9\} for every i=0,1,,k1i=0,1, \ldots, k-1.
Since nn in base 10 has exactly kk digits, we deduce that ak1=1a_{k-1}=1, because otherwise, if ak1>1a_{k-1}>1, we would have
n=5n55ak110k110k n=5 \cdot \frac{n}{5} \geq 5 \cdot a_{k-1} 10^{k-1} \geq 10^{k}
that is, nn would have at least k+1k+1 digits.

Moreover, observe that for every integer aa we have 5a=a1210+55 a=\frac{a-1}{2} 10+5, so in our case, recalling that ak1=1a_{k-1}=1, it holds that
n=5n5=5(ak110k1++a110+a0)=5ak110k1+5ak210k2+5a110+a0=510k1+(ak21210+5)10k2++(a11210+5)10+a01210+5=510k1+ak21210k1+510k2++a112102+510+a01210+5=(5+ak212)10k1+(5+ak312)10k2++(5+a112)102+(5+a012)10+5 \begin{aligned} & n=5 \cdot \frac{n}{5}=5\left(a_{k-1} 10^{k-1}+\cdots+a_{1} 10+a_{0}\right)=5 a_{k-1} 10^{k-1}+5 a_{k-2} 10^{k-2} \cdots+5 a_{1} 10+a_{0}= \\ & 5 \cdot 10^{k-1}+\left(\frac{a_{k-2}-1}{2} 10+5\right) 10^{k-2}+\cdots+\left(\frac{a_{1}-1}{2} 10+5\right) 10+\frac{a_{0}-1}{2} 10+5= \\ & 5 \cdot 10^{k-1}+\frac{a_{k-2}-1}{2} 10^{k-1}+5 \cdot 10^{k-2}+\cdots+\frac{a_{1}-1}{2} 10^{2}+5 \cdot 10+\frac{a_{0}-1}{2} 10+5= \\ & \left(5+\frac{a_{k-2}-1}{2}\right) 10^{k-1}+\left(5+\frac{a_{k-3}-1}{2}\right) 10^{k-2}+\cdots+\left(5+\frac{a_{1}-1}{2}\right) 10^{2}+\left(5+\frac{a_{0}-1}{2}\right) 10+5 \end{aligned}
What is written above, since the aia_{i} are odd digits, is the decimal representation of nn, because
05+ai1290 \leq 5+\frac{a_{i}-1}{2} \leq 9 and ai12\frac{a_{i}-1}{2} is an integer for every i=0,,k2i=0, \ldots, k-2.

Since by (a) nn has kk odd digits, we deduce that 5+ai1125+\frac{a_{i-1}-1}{2} must be odd for i=1,,k1i=1, \ldots, k-1, that is, aia_{i} can only take the values 1,51,5 and 99.

There are thus at most three ways to choose ai,i=0,,k2a_{i}, i=0, \ldots, k-2, while ak1=1a_{k-1}=1, that is, there are at most 3k13^{k-1} candidates for n5\frac{n}{5} and hence for nn.

The explicit formula (1) also shows that every such choice gives a number nn satisfying (a) and (b).
It thus remains proven that such numbers are exactly 3k13^{k-1}.

Solution 2

Solution:

Let us first note that, for a fixed natural number kk greater than 00, the positive integers satisfying properties (a) and (b) are as many as the positive integers with kk digits all odd whose multiplication by 55 is still of kk odd digits, since multiplication by 55 is an injective function.

Let a1a2aka_{1} a_{2} \ldots a_{k} be the base ten representation of an integer with all odd digits whose multiplication by 55 is still of kk odd digits. Each multiplication ai5a_{i} \cdot 5 has 55 as its units digit.

The digit a1a_{1} is 11, since 35=153 \cdot 5=15 already produces a unit of the next power of ten, hence the product by 55 would have n+1n+1 digits.

For i=2,,ni=2, \ldots, n the tens digit of ai5a_{i} \cdot 5 must be even because it must give an odd digit when added to the 55 units of the number ai15a_{i-1} \cdot 5: hence aia_{i} is 1,51,5, or 99 for i=2,,ni=2, \ldots, n.

For k>0k>0 natural, the number of positive integers satisfying properties (a) and (b) is 3k13^{k-1}.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from it; metadata (topic, difficulty) added by this project.