Maths Olympiad Prep

Library / /61 of 520

Number theory Difficulty 6.4 National olympiad Find the answer

An integer n>0n>0 is written in decimal system as amam1a1\overline{a_ma_{m-1}\ldots a_1}. Find all nn such that
n=(am+1)(am1+1)(a1+1)n=(a_m+1)(a_{m-1}+1)\cdots (a_1+1)

A number or a short expression. Spacing and $ signs are ignored.

Solution

To solve the problem, we need to find all positive integers n n such that the decimal representation of n n , denoted as amam1a1\overline{a_m a_{m-1} \ldots a_1}, satisfies the equation:
n=(am+1)(am1+1)(a1+1) n = (a_m + 1)(a_{m-1} + 1) \cdots (a_1 + 1)

1. **Express n n in terms of its digits:**
n=i=1m10i1ai n = \sum_{i=1}^{m} 10^{i-1} a_i
where ai a_i are the digits of n n .

2. Set up the given equation:
i=1m10i1ai=i=1m(ai+1) \sum_{i=1}^{m} 10^{i-1} a_i = \prod_{i=1}^{m} (a_i + 1)

3. Rearrange the equation:
i=2m(10i1j=1i1(aj+1))ai=1 \sum_{i=2}^{m} (10^{i-1} - \prod_{j=1}^{i-1} (a_j + 1)) a_i = 1
This equation implies that all summands are nonnegative, and one of them must be 1 while the others are 0.

4. **Consider the case m=2 m = 2 :**
n=10a2+a1 n = 10a_2 + a_1
n=(a2+1)(a1+1) n = (a_2 + 1)(a_1 + 1)
We need to find a1 a_1 and a2 a_2 such that:
10a2+a1=(a2+1)(a1+1) 10a_2 + a_1 = (a_2 + 1)(a_1 + 1)
Expanding and simplifying:
10a2+a1=a2a1+a2+a1+1 10a_2 + a_1 = a_2 a_1 + a_2 + a_1 + 1
10a2=a2a1+a2+1 10a_2 = a_2 a_1 + a_2 + 1
9a2=a2a1+1 9a_2 = a_2 a_1 + 1
9a21=a2a1 9a_2 - 1 = a_2 a_1
a1=9a21a2 a_1 = \frac{9a_2 - 1}{a_2}
For a1 a_1 to be an integer, 9a21 9a_2 - 1 must be divisible by a2 a_2 . Testing values of a2 a_2 from 1 to 9, we find:
a2=2    a1=9212=1812=172(not an integer) a_2 = 2 \implies a_1 = \frac{9 \cdot 2 - 1}{2} = \frac{18 - 1}{2} = \frac{17}{2} \quad \text{(not an integer)}
a2=1    a1=9111=8 a_2 = 1 \implies a_1 = \frac{9 \cdot 1 - 1}{1} = 8
Thus, n=101+8=18 n = 10 \cdot 1 + 8 = 18 .

5. **Consider the case m3 m \geq 3 :**
If m3 m \geq 3 , then:
j=1m1(aj+1)=10m1 \prod_{j=1}^{m-1} (a_j + 1) = 10^{m-1}
This implies:
a1=a2==am1=9 a_1 = a_2 = \cdots = a_{m-1} = 9
However, this is impossible because the product of digits ai+1 a_i + 1 would be too large to match the sum of the digits multiplied by powers of 10.

Therefore, the only solution is when m=2 m = 2 and n=18 n = 18 .

The final answer is 18 \boxed{18} .

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.