Hello, I need to solve this: I need to find a sum of digits for all natural numbers: 1) from 1 to 2000 (1 and 2000 includes)
@ash2326
There's this story of Karl Friedrich Gauss and his teacher, who was so lazy, he'd just ask his students to add up sums like this (MANUALLY!) which would, understandably take the whole period, while the teacher just slacks off... until Gauss found a formula for solving such sums quickly :D Formula for the sum of all numbers from 1 to n is \[\huge \frac{n(n+1)}{2}\] Good hunting :)
So, i need to find n: \[a _{n}=a _{1}+(n-1)d\] \[2000=1+(n-1)1\] n=2000 \[\frac{ 2000(2000+1) }{ 2 }=2001000\]?
Yeah, that's it :D n is the last number you add
but I have another problem: find a sum of digits: a) 1 to 10^n I get n=10^n \[\frac{ 10^{n}(10^{n}+1) }{ 2 }\] is this an answer?
sum of digits? or sum of number?
Digits
like 321=3+2+1
and for all numbers from 1 to 2000
well, is it an wrong formula?
Hmmm... I may have to rethink this... stand by :D
So, you take the sum from 1 to 2000, and add the digits?
well, you need to find a sum of a digits from 1 to 2000.. for exmple: 1+2+3+4+5+6+7+8+9+1+0+1+1+...+2+0+0+0
any ideas?
?
That seems beyond my knowledge o.O I'll look into it.
Join our real-time social learning platform and learn together with your friends!