Number 3 Appearing 1-1000: Counting Stats

  • Level: High School 
  • Thread starter Abderrahim
  • Start date
  • Tags Tags
    Statistic
1 reply · 2K views · last reply
Abderrahim
Messages
1
Reaction score
0
How many times will the number 3 appear in counting numbers from 1 to 1000?

PS: Just joined the forums.
 
Hi there,

I'm not sure if it's really statistics, and it sounds a bit like a homework question...

Here's a hint:
there's 1 3 in the units digit in every nnn0..nnn9
there's 10 3s in the tens digit in ever nn00..nn99
etc...

Mathematica can construct all of the digits and count the number of 3s using
Count[Flatten[IntegerDigits/@Range[1000]], 3]