Answer:
a) 4000
b1) 480
b2) 3,520
b3) 1,434
Explanation:
a)
4999 - 1000 +1 = 4000
b)
We must find numbers of the form “abcd” where “a” is 1,2,3 or 4 and all the digits are different to each other.
The digits “bcd” must be chosen from the set {0,5,6,7,8,9} with no repetition. So by the fundamental rule of counting, we have
4*6*5*4 = 480 numbers between 1000 and 4999 with no repeated digits.
2.
We can see that this set is the complement of the previous one, so there are 4,000 - 480 = 3,520
3.
Let's compute the amount of number with exactly 2 repeated digits and add it to 480 (amount with no repeated digits)
Starting with 1
we have numbers of the form 11xy, 1x1y and 1xy1 where xy are permutations of the set {0,2,3,4,5,6,7,8,9} taken 2 at a time, so we have 72+72+72 = 216.
The same procedure is repeated for 2,3 and 4 and we have
216+216+216 +216 = 864 numbers starting with 1,2,3 or 4 and exactly two repeated digits.
Now we found the triplets xxy, xyx, yxx with exactly 2 repeated digits none of them 1,2,3 or 4 and we have
15+15+15+15+15+15 = 90
And finally we have
864+90+480 = 1,434 digits with at most 2 repeated digits.