What is the sum of digits in the numbers 1 to 2010?

K Sengupta
Messages
113
Reaction score
0
Determine the sum of all the digits in the positive integers from 1 to 2010 inclusively.
 
Physics news on Phys.org
42.

It's the answer to everything.
 
2010*(2010+1)/2
 
Wouldn't that get you the sum of all the numbers, not the sum of the digits?
 
0->9 : (0..9) = 45
10->19 : 10*1*(0..9) = 450
20->29 : 10*2*(0..9) = 900
30->39: 10*3*(0..9) = 1350
...
2000-2009 : 10*200*(0..9) = 90000

+ 1
...


10*(1..200) + 201*(0..9) + 1 = 201000 + 9045 + 1 = 210046 digits from 1 to 2010
 
Similar to the 2024 thread, here I start the 2025 thread. As always it is getting increasingly difficult to predict, so I will make a list based on other article predictions. You can also leave your prediction here. Here are the predictions of 2024 that did not make it: Peter Shor, David Deutsch and all the rest of the quantum computing community (various sources) Pablo Jarrillo Herrero, Allan McDonald and Rafi Bistritzer for magic angle in twisted graphene (various sources) Christoph...
Thread 'My experience as a hostage'
I believe it was the summer of 2001 that I made a trip to Peru for my work. I was a private contractor doing automation engineering and programming for various companies, including Frito Lay. Frito had purchased a snack food plant near Lima, Peru, and sent me down to oversee the upgrades to the systems and the startup. Peru was still suffering the ills of a recent civil war and I knew it was dicey, but the money was too good to pass up. It was a long trip to Lima; about 14 hours of airtime...
Back
Top