let S be the sum of all digits used in writing all numbers from 1 to 1010. the sum of digits of S is
it doesnt even form an AP .:(
do it step by step, slowly
but how adding dem all .?
00-09 = sum9 10-19 = 1*10 + sum9 20-29 = 2*10 + sum9 ... 90-99 = 9*10 + sum9 ---------------------- 10*sum9 + 10(sum 9) sum9(20) = 45*20 = 900 so 00->99 the sum of digits used is 900
alright .!
btw, sum9 = 0+1+2+3 + .... 9
next, consider 100->999 100->199 = 1*100 + 900 200->199 = 2*100 + 900 ....
yeah ..i interpreted .!
for 100->999 : if you add them all, clearly u wud get :- 100(sum9) + 10*900
4500+9000=13500
dont forget to add 00->99 and 1000->1010 :)
I was lazy and did it with Mathematica and got 13,501
65+900 also to be included .!
something is incorrect ..in my work .??
mathematica cannot be wrong. lets work it wid more attention :) we made a mistake, corrected below :- for 100->999 : if you add them all, clearly u wud get :- 100(sum9) + \(\color{red}{9} \)*900
100 - 999, there are 9 groups of 100s. not 10.
ohh ..yes//
Here is the Mathematica Code to do it Total[Table[Total[IntegerDigits[j]], {j, 1, 1000}]]
what is that ..voo .?
ahh we're right ! we also got 13501 for the numbers between 1 & 1000
then ...for 1010 also right .? .!
00->99 : 900 100->999 : 100(sum9) + 9*900 = 4500 + 8100 = 12600 1000->1010 : 1*11 + sum9 + 1 = 12 + 45 = 57 add them
S=13557 so the sum of digits of S is 21 ..yeah .. a medal was the least honor to u ..! thank u .! sir @ganeshie8 and @eliassaab ..for correcting that
np :)
Mathematica agrees Total[Table[Total[IntegerDigits[j]], {j, 1, 1010}]] = 13557
actually ..some script problem ..i am not being able to see in the desired format ..! ..but is that ..any direct formula to do that .?
I am thinking about it
Your problem can be found on http://answers.yahoo.com/question/index?qid=20100327133907AAp8Umm One of the solution is similar to what you did above
ohh ..yes ..
Join our real-time social learning platform and learn together with your friends!