Step 1: Understanding the Concept:
We need to form a 7-digit number using only digits {1, 2, 3, 4, 5} such that all digits are present at least once.
Since there are 7 places and 5 distinct digits, some digits must repeat to fill all slots.
Step 2: Key Formula or Approach:
There are two ways to distribute 5 distinct digits into 7 slots such that each digit appears at least once:
Case 1: One digit is repeated 3 times, and the others appear once (\( 3, 1, 1, 1, 1 \)).
Case 2: Two digits are repeated 2 times each, and the others appear once (\( 2, 2, 1, 1, 1 \)).
Step 3: Detailed Explanation:
Case 1:
Choose 1 digit to repeat 3 times: \( \binom{5}{1} = 5 \).
Number of arrangements of 7 digits where one is repeated thrice: \( \frac{7!}{3!} = 840 \).
Total for Case 1 = \( 5 \times 840 = 4200 \).
Case 2:
Choose 2 digits to repeat 2 times each: \( \binom{5}{2} = 10 \).
Number of arrangements of 7 digits where two are repeated twice: \( \frac{7!}{2!2!} = \frac{5040}{4} = 1260 \).
Total for Case 2 = \( 10 \times 1260 = 12600 \).
Total Numbers:
Total = \( 4200 + 12600 = 16800 \).
Step 4: Final Answer:
The number of such seven-digit numbers is 16800.