How many positive numbers up to and including 2016 have at least one repeating digit?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The trick is to count the numbers without repeating digits then subtract it from 2016. Clearly, there are 9 1-digit number without repeating digits. There are 2 ( 2 1 0 ) − 9 = 8 1 two-digit numbers without repeatition. There are 3 ! ( 3 1 0 ) − 2 ( 2 9 ) = 6 4 8 three-digit numbers without repeatition. If the thousands digit is 1, there are 3 ! ( 3 9 ) = 5 0 4 four-digit numbers without repeatition. When the thousands digit is 2, there are 4 such numbers, namely 2013,2014, 2015, 2016. Hence, there are 5 0 4 + 4 = 5 0 8 four-digit numbers less than or equal to 2016 without repeating digits. Therefore, the number of integers from 1 to 2016 including 1 and 2016 with repeating digits is given by 2 0 1 6 − ( 9 + 8 1 + 6 4 8 + 5 0 8 ) = 7 7 0
Problem Loading...
Note Loading...
Set Loading...
Let's see how many positive numbers from 1 up to and including 2016 have no repeating digits.
Let d n be the n t h digit of the number.
1 digit numbers:
All 9 single digits numbers have no repeating digits.
2 digit numbers:
d 1 ∈ { 1 , 2 , . . . , 9 } and d 2 ∈ { 0 , 1 , . . . , 9 } but different from the first.
So a total of 9 × 9 = 8 1 two-digit numbers have no repeating digits.
3 digit numbers:
d 1 ∈ { 1 , 2 , . . . , 9 } and d 2 ∈ { 0 , 1 , . . . , 9 } but different from the first and d 3 ∈ { 0 , 1 , . . . , 9 } but different from the first and second.
So a total of 9 × 9 × 8 = 6 4 8 three-digit numbers have no repeating digits.
4 digit numbers starting with 1:
d 1 = 1 and d 2 ∈ { 0 } ∪ { 2 , . . . , 9 } and d 3 ∈ { 0 } ∪ { 2 , . . . , 9 } but different from the second and d 4 ∈ { 0 } ∪ { 2 , . . . , 9 } but different from the second and the third.
So a total of 1 × 9 × 8 × 7 = 5 0 4 four-digit numbers have no repeating digits.
4 digit numbers starting with 2 (up to 2016):
Only 2013, 2014, 2015 and 2016 have no repeating digits.
Conclusion: In total 2 0 1 6 − 9 − 8 1 − 6 4 8 − 5 0 4 − 4 = 7 7 0 positive numbers from 1 up to 2016 have at least one repeating digit.