For positive integers and , define the sequence by where denotes the product of the decimal digits of (for example, and ). Prove that there are positive integers and for which the sequence contains exactly different numbers.
Problem 1521
Official solution
1. **Define the sequence and the function :**
- The sequence is defined as with and for .
- The function denotes the product of the decimal digits of . For example, and .
2. Identify the condition for the sequence to stop increasing:
- The sequence will stop increasing when for some . This is because if , then , and the sequence will remain constant from that point onward.
3. **Determine the minimal value such that :**
- We need to find positive integers and such that the sequence contains exactly 2009 different numbers. This means and .
4. Construct a sequence with the desired properties:
- Choose . This choice ensures that the sequence will have 2008 steps before reaching a number with a zero digit.
- Choose . This simplifies the calculations and ensures that the sequence increases by at each step.
5. Verify the sequence:
- For , will be a number with no zero digits, and .
- At , will be a number with at least one zero digit, making .
6. Conclusion:
- The sequence contains exactly 2009 different numbers, as required.