# Numbers between 100 and 10000 with exactly 3 same figures

1. Feb 1, 2010

### maya :D

Hi!
I'm sorry if my question is a bit stupid. How many numbers between 100 and 10000 have exactly 3 same figures? I saw this question on the Internet and I couldn't get the right answer. Somehow I got 657, and the answer should be 333. Can anyone help me?
Thanks:)

2. Feb 2, 2010

### HallsofIvy

Staff Emeritus
What, exactly, do you mean by "3 same figures". Do you mean things like 333, 555? What about larger than 999: are you including 1333 and 2333, etc.? What about 2333, 3233, 3233, and 3332? That is, can the "3 same figures" be anywhere in the number and can the fourth digit be anything? What if all four digits are the same? Do you include those or must there be exactly three digits the same?

3. Feb 2, 2010

### CRGreathouse

My best guess is that you mean that in the (multiset of the) decimal digits of the number, there is some digit that is repeated exactly three times. So 222 and 5155 would be allowed, but not 123 or 5555.

In that case there are 9 three-digit numbers, so all that remains is to count the four-digit numbers.

There are 10 ways to choose the repeated digit and 9 ways to choose the other. For any such selection there are 4 choices: x___, _x__, __x_, and ___x. So this seems to give 360 ways. But 0 is not allowed as the first digit, so let's recount more carefully.

There are 9 ways to choose a nonzero digit to be repeated and 8 nonzero ways to choose the other. This gives 288 ways.

There are 9 ways to choose a nonzero repeated digit with 0 for the other. The 0 can go in only three places, so this is 27 ways.

There are 9 ways to choose a nonzero digit with 0s repeated. The nonzero must go in front, so that's 9 ways.

9 + 288 + 27 + 9 = 333.

4. Feb 2, 2010

### maya :D

sorry for being inaccurate. By 3 same figures I mean any number between 100 and 10 000 that contains 3 same figures, one after another (eg. 333,1333...) or in some other order (eg. 414, 52525). And there cannot be more than 3 same figures (eg. 7777), there must be exactly three

5. Feb 2, 2010

thanks:)

6. Feb 4, 2010

### Mandark

Any such number will either be 3 or 4 digits. If it's 3 digits then there are 9 possibilities i.e. 111, 222, ..., 999. If it's 4 digits then consider the case that the number has no 0s, then there are 9 ways to select a 3 digit repeat number and 8 ways to select the remaining digit, and 4 ways to permute these i.e. 1112, 1121, 1211, 2111, giving 9*8*4. If 0 is repeated 3 times then there are 9 possibilities, i.e. 1000, ..., 9000. If 0 is one of the remaining digits then there are 9 ways to select the repeat digit and 3 ways to permute, giving 9*3. Adding up: 9 + 9*8*4 + 9 + 3*9 = 333.