Number 3 Appearing 1-1000: Counting Stats

  • Context: High School 
  • Thread starter Thread starter Abderrahim
  • Start date Start date
  • Tags Tags
    Statistic
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
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.
 
Physics news on Phys.org
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]