Counting Digit 5 Occurrences 0-1000

  • Thread starter Thread starter f(x)
  • Start date Start date
AI Thread Summary
The discussion centers on calculating how many times the digit 5 appears in numbers from 0 to 1000. One participant initially calculates a total of 264 occurrences using combinations, while another suggests a different approach that yields a total of 271 occurrences. The latter includes specific counts for numbers with one, two, and three occurrences of the digit 5, highlighting the importance of considering all possible placements of the digit. Additionally, there is a suggestion to count numbers without the digit 5 and subtract from the total to simplify the calculation. Overall, the conversation emphasizes the complexity of counting digit occurrences accurately.
f(x)
Messages
182
Reaction score
0

Homework Statement


How many times does digit 5 occur in numbers fro 0-1000.

Homework Equations




The Attempt at a Solution


This is what i have done.
Total (1,2,3) digit numbers which have digit 5 occurring once in them are-:
3.^9C_1.^9C_1 = 243
Total numbers with 5 occurring twice are ^9C_1 = 9
So, digit 5 occurs 9*2=18 times
Total Numbes with 5 occurring thrice= 1
So digit 5 occurs 3*1=3
Total times digit 5 occurs is 243+18+1=264

Is this correct, specially regarding repetitions or exclusions which i may have made?
 
Physics news on Phys.org
I would have done this quite differently. first, there is xy5 in every 10 numbers and there are 100 sets of 10 in 1000: 100 such numbers. In addition, there is 5x 9 times (not counting 55) in every 100, and 10 hundreds in 100, so 90 more Finally, every number from 500 to 599 has a 5. leaving out those of the form 5x5 and 55x, that's an additional 81. That makes a total of 100+ 90+ 81= 271 numbers between 1 and 1000 that have at least one digit 5.
 
"Total numbers with 5 occurring twice are ^9C_1 = 9
So, digit 5 occurs 9*2=18 times"
I think you missed a few numbers on this one...

55, 155, 255, 355, 455, 655, 755, 855, 955
That's 9 numbers with two 5's. But also:
505,515,525,535,545,565,575,585,595
And:
550, 551, 552, 553, 554, 556, 557, 558, 559

Thus, there are 3 locations that the non-5 can be, thus there are
^9C_1 *3= 9 *3 numbers with two 5's,
Resulting in a total of 27*2 = 54 5's.

Other than that, I probably would have initially used HallsofIvy's approach as well. However, after reviewing your approach, I think I like it better. (With your approach, your solution would match HallofIvy's solution for the number of distinct numbers with a 5 in it, rather than the number of times "5" occurs:
3.^9C_1.^9C_1 = 243
+3.^9C_1 = 27
+1

But, since you're counting the 5's, you have to multiply that 2nd line by 2 and the 3rd line by 3. Nice.
 
Last edited:
It seems like it can be read two different ways. If you just want to count the number of 5s in the numbers between 0 and 999, then you may as well write the numbers with three digits, that is, from 000 to 999, and then it should be clear that the three digits are independent. This is easy.

More difficult is to count the numbers that have any 5 in them. To do this, you might try instead counting the number of three digit numbers that don't have any 5 in them, and subtract that from 1000.
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top