# Sum of digits of numbers

Suppose $N = 1+11+101+1001+10001+\dots+1\underbrace{00\dots00}_{50\text{ zeroes}}1$.

When $N$ is written as a single integer, i.e. all terms added, what is the sum of the digits of $N$?

I tried subtracting $1$ from each term to get:

$$0+10+100+\dots\;,$$

therefore ending with a sum of $\underbrace{111\dots111}_{50\text{ ones}}$.

Then I added $50$ to the end two numbers of $N$ ($50$ is the total number of ones I minused); there the end two numbers would be $6$ and $0$; therefore add all the ones, ($49$ I think) and the $6$ to obtain $55$.

Not sure if this is the way to do it though?

-
I may have miscounted my ones –  Daniel May 15 '12 at 7:45
The method seems all right. Be careful though in counting things; for instance your sum has $52$ terms to begin with. –  Marc van Leeuwen May 15 '12 at 7:46

You might try again to count the numbers of terms. If you had started with $1+11+101 =113$ your method seems to give an answer of $2$ when the answer should be $5$.
I think you have $52$ terms in the original sum, giving $51$ ones in $111\ldots1110$ to which you add $52$, giving giving $50$ ones in $111\ldots1162$ a digit sum of $58$.
@Daniel: yes - as in "to which you add $52$" –  Henry May 15 '12 at 7:48