Maths Olympiad Prep

Library / Progetto Olimpiadi di Matematica - GARA di SECONDO LIVELLO /18 of 19

Progetto Olimpiadi di Matematica - GARA di SECONDO LIVELLO

Algebra Difficulty 6.6 National Olympiad Prove it Italy

Problem:

Let k≥1k \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 3k−13^{k-1}.

To prove this, consider the integer n5\frac{n}{5} and let a0,a1,…,ak−1a_{0}, a_{1}, \ldots, a_{k-1} be its digits, that is
n5=ak−110k−1+…+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,…,k−1i=0,1, \ldots, k-1.
Since nn in base 10 has exactly kk digits, we deduce that ak−1=1a_{k-1}=1, because otherwise, if ak−1>1a_{k-1}>1, we would have
n=5⋅n5≥5⋅ak−110k−1≥10k 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=a−1210+55 a=\frac{a-1}{2} 10+5, so in our case, recalling that ak−1=1a_{k-1}=1, it holds that
n=5⋅n5=5(ak−110k−1+⋯+a110+a0)=5ak−110k−1+5ak−210k−2⋯+5a110+a0=5⋅10k−1+(ak−2−1210+5)10k−2+⋯+(a1−1210+5)10+a0−1210+5=5⋅10k−1+ak−2−1210k−1+5⋅10k−2+⋯+a1−12102+5⋅10+a0−1210+5=(5+ak−2−12)10k−1+(5+ak−3−12)10k−2+⋯+(5+a1−12)102+(5+a0−12)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
0≤5+ai−12≤90 \leq 5+\frac{a_{i}-1}{2} \leq 9 and ai−12\frac{a_{i}-1}{2} is an integer for every i=0,…,k−2i=0, \ldots, k-2.

Since by (a) nn has kk odd digits, we deduce that 5+ai−1−125+\frac{a_{i-1}-1}{2} must be odd for i=1,…,k−1i=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,…,k−2a_{i}, i=0, \ldots, k-2, while ak−1=1a_{k-1}=1, that is, there are at most 3k−13^{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 3k−13^{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 a1a2…aka_{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 ai⋅5a_{i} \cdot 5 has 55 as its units digit.

The digit a1a_{1} is 11, since 3⋅5=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 ai⋅5a_{i} \cdot 5 must be even because it must give an odd digit when added to the 55 units of the number ai−1⋅5a_{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 3k−13^{k-1}.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge 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.