Let be the number of 2019-digit numbers, that is made of 2 different digits (For example is such number). Determine the highest power of 3 that divides .
Problem 1284
Official solution
1. **Define :**
Let be the number of 2019-digit numbers made of 2 different digits. We can split into two parts:
where is the number of 2019-digit numbers made of the digit and another digit (where ), and is the number of 2019-digit numbers made of two different non-zero digits.
2. **Calculate :**
- A number containing only the digits and must begin with (since it is a 2019-digit number and cannot start with 0).
- The remaining 2018 digits can be any combination of and , except the configuration with all 2018 digits being .
- For a fixed , there are such numbers.
- Since there are 9 possible values for (from 1 to 9), we have:
3. **Calculate :**
- Let with .
- A number which begins with the digit can continue with any combination of and , except the configuration with all 2018 digits being .
- Similarly, a number which begins with the digit can continue with any combination of and , except the configuration with all 2018 digits being .
- Hence, there are numbers containing only the digits and (i.e., numbers beginning with and numbers beginning with ).
- With the elements of the set , we can form distinct pairs (since and are not distinct).
- Therefore:
4. **Combine and :**
5. **Determine the highest power of 3 that divides :**
We need to find .
6. **Calculate :**
- We use the fact that (since ).
- Since , we have:
- Therefore:
- This implies:
7. Combine the results:
The final answer is