Menu Close

Is-there-a-formular-to-tell-how-many-times-a-digit-occur-in-an-interval-e-g-How-many-times-digits-2-occur-between-1-100-




Question Number 116091 by I want to learn more last updated on 30/Sep/20
Is there a formular to tell how many times a digit occur in an interval.    e.g.  How many times digits  2  occur between  1 − 100
Isthereaformulartotellhowmanytimesadigitoccurinaninterval.e.g.Howmanytimesdigits2occurbetween1100
Answered by 1549442205PVT last updated on 01/Oct/20
In each tens the digits 2 appears one  time,only tens from 20 to 30 digits 2  appears two times.Therefore,from 1  to 100 digts 2 appears 11 times  The other digits are the  same
Ineachtensthedigits2appearsonetime,onlytensfrom20to30digits2appearstwotimes.Therefore,from1to100digts2appears11timesTheotherdigitsarethesame
Commented by I want to learn more last updated on 01/Oct/20
Thanks sir
Thankssir
Commented by 1549442205PVT last updated on 01/Oct/20
You are welcome
Youarewelcome
Commented by mr W last updated on 02/Oct/20
2 ⇒one time 2  12,22,32,...,92 ⇒10 times 2  20,21,23,...,29 ⇒9 times 2  ⇒totally 1+10+9=20 times 2
2onetime212,22,32,,9210times220,21,23,,299times2totally1+10+9=20times2
Answered by mr W last updated on 01/Oct/20
n digit numbers:  10^(n−1) +(n−1)×9×10^(n−2)   =(9n+1)10^(n−2)     from 1 to 100:  1+19×1=20 times
ndigitnumbers:10n1+(n1)×9×10n2=(9n+1)10n2from1to100:1+19×1=20times
Commented by I want to learn more last updated on 06/Oct/20
I just see this now sir,  so it will work for  1 to 50  too  or  another  nth derivative
Ijustseethisnowsir,soitwillworkfor1to50toooranothernthderivative
Commented by I want to learn more last updated on 06/Oct/20
And sorry for bordering you sir,  How to generalise it as you solve, so that i can think too on my own.  Thanks sir.
Andsorryforborderingyousir,Howtogeneraliseitasyousolve,sothaticanthinktooonmyown.Thankssir.
Commented by I want to learn more last updated on 06/Oct/20
Thanks sir,  i appreciate.
Thankssir,iappreciate.
Commented by mr W last updated on 06/Oct/20
let′s look at numbers with m digits  xxxx...x  the digit 2 (or any other non−zero  digit) can be at first position  2xxx..x  there are 10×10×..×10=10^(m−1)   such numbers, i.e. digit 2 comes  10^(m−1)  times at this position.  when the digit 2 is at other positions,  x2xx..x  (m−1 possible positions)  there are 9×10×10×...10=9×10^(m−2)   such numbers, i.e. digit 2 comes  (m−1)×9×10^(m−2)  times.    all together:  10^(m−1) +(m−1)×9×10^(m−2)   =10^(m−2) [10+(m−1)×9]  =(9m+1)×10^(m−2)
letslookatnumberswithmdigitsxxxxxthedigit2(oranyothernonzerodigit)canbeatfirstposition2xxx..xthereare10×10×..×10=10m1suchnumbers,i.e.digit2comes10m1timesatthisposition.whenthedigit2isatotherpositions,x2xx..x(m1possiblepositions)thereare9×10×10×10=9×10m2suchnumbers,i.e.digit2comes(m1)×9×10m2times.alltogether:10m1+(m1)×9×10m2=10m2[10+(m1)×9]=(9m+1)×10m2
Commented by I want to learn more last updated on 06/Oct/20
I appreciate sir
Iappreciatesir

Leave a Reply

Your email address will not be published. Required fields are marked *