## How Big is a Trillion

Part 1. First determine the sum of all the digits needed to write each counting number from $0$ through $1,000,000,000,000$. For example, the sum of all the digits needed to write each counting number from $18$ through $23$ would be $1+8+1+9+2+0+2+1+2+2+2+3=33$.
Part 2. Next, find the sum of the digits of the sum found in Part 1. In other words, for $18$ through $23$, the sum of all of the digits was $33$, and the sum of the digits of that sum is $3+3=6$.
Part 3. Finally, only submit your sum of the digits for the sum of the digits or simply the answer you determined for Part 2.
Source: mathcontest.olemiss.edu 11/4/2013

SOLUTION
We first try a few smaller problems to get a feel for what’s happening. Let’s find the sum of the numbers from $0\to 99$. The following table lists the numbers from $0\to 99$ by columns. The sum of the numbers of each row is listed at the end of the row. For example, the sum of the numbers in the first row equals $450$; the sum of the numbers in the second row equals $460$; etc. Likewise, the sum of the numbers in each column is listed at the bottom of the column. For example, the sum of the numbers in the first column equals $45$; the sum of the numbers in the second column equals $145$; etc.

Sum of numbers $0\to 99$
Rows: $450+460+470+\cdots +540=4950$
Columns: $45+145+245+\cdots +945=4950$

Sum of numbers $100\to 199$
Rows: $1450+1460+1470+\cdots +1540=14950$
Columns: $1045+1145+1245+\cdots +1945=14950$

Sum of numbers $200\to 299$
Rows: $2450+2460+2470+\cdots +2540=24950$
Columns: $2045+2145+2245+\cdots +2945=24950$

If we continue this method, we have the following results

Sum of numbers $0\to 1999$
$4950+14950+24950+\cdots +194950=4950\times 20+\left (1+2+3+\cdots +19\right )10^4$
$=99000+\left (190\right )10000$
$=1999000$
As the numbers increase by $100$ from row to row, the sums increase by $10000$.  The $20$ rows correspond to the $20$ intervals of $100$ into which the distance of $2000$ from $0\to 1999$ is divided. The sum $\left (1+2+3+\cdots\right )$ stops at $19$ which is $1$ less than $20$.

We are now ready to calculate the sum of numbers from $0\to 999,999,999,999$
Number of $100$-intervals
$\dfrac{10^{12}}{100}=10^{10}$
$4950\times 10^{10}+\left (1+2+3+\cdots +9,999,999,999\right )10^4=4950\times 10^{10}+\left (5\times 10^9\times 9,999,999,999\right )10^4$
$=495\times 10^{11}+49,999,999,995\times 10^{13}$
$=\left (495+49,999,999,995\times 10^2\right )10^{11}$
$=\left (4,999,999,999,995\right )10^{11}$

Finally, we add $1,000,000,000,000$ to the above sum
$\left (4,999,999,999,995\right )10^{11}+10^{12}=\left (4,999,999,999,995+10\right )10^{11}$
$=\left (5,000,000,000,005\right )10^{11}$

Sum of the digits
$5+5=10$

Answer: $10$

Alternative solution
Imagine a sheet of paper with the digits $00,01,02,\cdots,99$ written in a table of $100$ rows by $2$ columns. If you fold the paper in half by folding the bottom half to the top half, you end up with a table of $50$ rows by $4$ columns a portion of which is shown below
$0\;9\;0\;9$
$0\;9\;1\;8$
$0\;9\;2\;7$
$0\;9\;3\;6$
$0\;9\;4\;5$
$0\;9\;5\;4$
$0\;9\;6\;3$
$0\;9\;7\;2$
$0\;9\;8\;1$
$\underline{0\;9\;9\;0}$
$1\;8\;0\;9$
$1\;8\;1\;8$
$1\;8\;2\;7$
$1\;8\;3\;6$
$1\;8\;4\;5$
$1\;8\;5\;4$
$1\;8\;6\;3$
$1\;8\;7\;2$
$1\;8\;8\;1$
$\underline{1\;8\;9\;0}$
$2\;7\;0\;9$
$2\;7\;1\;8$
$2\;7\;2\;7$
$2\;7\;3\;6$
$2\;7\;4\;5$
$2\;7\;5\;4$
$2\;7\;6\;3$
$2\;7\;7\;2$
$2\;7\;8\;1$
$\underline{2\;7\;9\;0}$
$\cdots$
If you add the digits horizontally across the rows, each row sums to $2\times 9=18$ for a total of $50\times 18=900$.
The sum of the digits of $0\to 99$ equals $900$.

Imagine a sheet of paper with digits $000,000,000,000$ through $999,999,999,999$ written in a table of $10^{12}$ rows by $12$ columns. Fold the paper in half and you end up with a smaller table of $5\times 10^{11}$ rows by $24$ columns.
If you add the digits horizontally across the rows, each row sums to $12\times 9=108$ for a total of $5\times 10^{11}\times 108=54\times 10^{12}$.
The sum of the digits from $000,000,000,000\to 999,999,999,999$ equals $54\times 10^{12}$
Finally $5+4+1=10$ where $1$ comes from $1,000,000,000,000$.

Retired high school math teacher.
This entry was posted in Problem solving and tagged , , , , , , . Bookmark the permalink.

### 3 Responses to How Big is a Trillion

1. Allow me to shine a blinding light of clarity upon this for you and your readers.

Visualize a table of 1e12 rows and 12 columns, append leading zeros to all numbers less than 1e12. Fill the rows of the table (right justified) with the numbers from 0 to ((1e12)-1). One digit per cell. Thinking about the variation in the columns reveals that each column has the exact same number of each digit, but in a different sort order or variation pattern. By inspecting the 10^0 (see note 1) column’s first 10 entries, we may determine that the average of all the cells (digits) in the table is 4.5 and there are 12e12 of them for a total sum of 54e12. To account for the contribution of 1e12 add 1 to the total sum. 5+4+(0*12)+1 = 10.

Note 1: The right most column of the table. 10^0 is also known as the units position or the Least Significant Digit before the decimal point.

2. As a further exercise: Apply your preferred method to a 32 bit binary number range. One may also do it in hexadecimal: 0000 0000 to FFFF FFFF. It is quite easy and fun; if you choose your method wisely. 3Ch8 = 3Cx16^8 = 257,698,037,760 in base 10.

3. You may be asking: “Where did the 3C come from?” Okay, well, it comes from ((F+0)/2) * 8 . Or in simple English, the average value of each digit times the number of columns. 7.5 * 8 = 60 = 3C in base 16.

Happy Trails.