The number of digit numbers which are divisible by , with digits from the set and the repetition of digits is allowed, is _____.
Solution
Core idea. Count valid ordered endings first, then multiply by the independent prefix choices.
Concept refresher. For successive choices, the multiplication principle gives
Here C is the total count, and each stage has the stated number of choices regardless of earlier selections. Disjoint cases add instead. With repetition allowed, choosing a digit does not remove it from the choices available later.
Divisibility by four depends only on the last two digits. To justify this, write a whole number N as
where r is its two-digit ending and Q is the preceding block. The first part is always divisible by four, so N is divisible by four exactly when r is.
Picture the situation. Separate a five-digit number into a three-digit prefix and an ordered two-digit ending. The grid places the tens digit in the row and the units digit in the column. It lists every allowed ending, including repeated digits. The highlighted cells pass the divisibility test; the three free prefix slots can then be counted independently.
Approach. Settle the restricted ending first. Find every ordered pair from the allowed digits that is divisible by four, then multiply its count by the number of unrestricted prefixes. Keep repetition allowed throughout, including within the ending.
Step 1: Restrict only the last two positions
The equation in the refresher shows why changing any earlier digit cannot affect divisibility by four. If the last two digits are a and b in that order, their value is
Both digits belong to the five-element set, so there are initially twenty-five ordered pairs to test. They are not unordered selections, and equal digits are allowed. Since a multiple of four is even, only the units digits two and four can survive.
Step 2: Find the five valid endings
First let the units digit be two. The ending can be written as
It is divisible by four exactly when the bracket is even. That requires an odd tens digit, one, three or five, producing
For a units digit four,
Now the bracket is even exactly when a is even, giving tens digits two or four and endings
Therefore the complete ordered list is
There are five endings. In particular, forty-four must remain: repeating a digit is expressly allowed.
Step 3: Count the free prefixes
After any one valid ending is fixed, each of the first three positions can independently contain any of the five digits. A digit in the ending can also occur in the prefix; it has not been consumed. Zero is absent from the digit set, so the leading position has all five choices and every resulting string is genuinely a five-digit number. The prefix count is
This count is the same for every valid ending, which is what permits multiplication by the suffix count.
Step 4: Combine the disjoint cases
Every valid ending can be combined with each of the one hundred twenty-five prefixes. Different endings give disjoint cases, and every complete number has exactly one prefix and one ending. Thus the multiplication principle counts each valid number exactly once:
Answer. 625
Sanity check. The grid has exactly one valid units digit in each tens-digit row. Thus every choice of the first four digits has precisely one legal completion, giving the same count . This is below the unrestricted total . The valid ending forty-four allows repeated-digit examples such as 11144. Also 11132 is divisible by four although its digit sum is eight, so a divisibility-by-three condition would incorrectly discard it.
Smart method. Choose the first four digits freely. The units digit is then forced: when the tens digit is odd, it must be two; when the tens digit is even, it must be four. Both forced digits belong to the allowed set. This gives exactly one valid completion for each four-digit prefix, so the count is immediately
This shortcut works because the allowed units digits provide exactly one completion for every allowed tens digit. It is not a general rule that all restricted-digit numbers split equally among the four remainders. The grid verifies the needed one-completion property here.
Common wrong answers
- 1250: Checking only an even last digit gives . This includes endings such as fourteen, which are even but not divisible by four; the last two digits must pass the full test.
- 500: Excluding the repeated ending forty-four leaves four endings and gives . Repetition is allowed, so forty-four is valid and the suffix count is five.
- 24: Forbidding repetition everywhere leaves four distinct-digit endings and prefixes for each, giving . The digits do not get used up here: every prefix position retains all five choices, and forty-four is also permitted.
Key takeaway
The trap. Checking only evenness, banning allowed repetitions, or treating the available digits as used up.
How toppers think. They look for a fixed number of valid completions of each partial number.
Remember. The last two digits control divisibility by four; all three prefix positions retain five choices.
More on Fundamental Principle of Counting
- Let S₁ = {(i, j, k): i, j, k ∈ {1, 2, …, 10}},; S₂ = {(i, j): 1 ≤ i < j + 2 ≤ 10,; i, j ∈ {1, 2, …, 10}}…
- Let S={1,2,3,4}. The total number of unordered pairs of disjoint subsets of S is equal to
- If r, s, t are prime numbers and p, q are the positive integers such that LCM of p, q is r²t⁴s², then the…
- All 7 on Fundamental Principle of Counting ›