Average digit sum – 3

Balanced ternary is a number system that uses three digit corresponding to the place values of 1 , 0 , 1 -1, 0, 1 , in contrast to ternary that uses 0 , 1 , 2 0, 1, 2 .

The first numbers written in balanced ternary (using the "digits" , 0 , + -, 0, + ) are

decimal balanced ternary
0 10 0_{10} 000 000
1 10 1_{10} 00 + 00+
2 10 2_{10} 0 + 0+-
3 10 3_{10} 0 + 0 0+0
4 10 4_{10} 0 + + 0++
5 10 5_{10} + +--
6 10 6_{10} + 0 +-0
7 10 7_{10} + + +-+
8 10 8_{10} + 0 +0-
9 10 9_{10} + 00 +00
\vdots \vdots

The digit sum of a balanced ternary number can be calculated just like the normal digit sum, with the exception that - corresponds to 1 -1 , so subtracting 1 in the digit sum. For example, the digit sum of 5 = + 5 = +-- is + 1 1 1 = 1 +1-1-1 = -1 . This shows that the digit sum can also be negative.

Now, what is the average digit sum of all integers between 1 and 121 (both inclusive) when they're written in balanced ternary?

Other parts


The answer is 1.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

David Vreken
Dec 18, 2018

The first balanced ternary number (for the number 1) is +, for a digit sum of 1.

The next 3 balanced ternary numbers (for the numbers 2-4) are +-, +0, and ++. There are an equal number of +, 0, and - symbols in the last digit place, so those have no effect on the net digit sum, but the first digit place are all +'s, for an additional 3 to the total digit sum.

The next 9 balanced ternary numbers (for the numbers 5-13) are +--, +-0, +-+, +0-, +00, +0+, ++-, ++0, and +++. There are an equal number of +, 0, and - symbols in the last and second-to-last digit place, so those have no effect on the net digit sum, but the first digit place are all +'s, for an additional 9 to the total digit sum.

The same logic can be repeated for each consecutive 3 n 3^n grouping of balanced ternary numbers, and we find that we add an additional 3 n 3^n to the total digit sum each time. Since 121 = 1 + 3 + 9 + 27 + 81 121 = 1 + 3 + 9 + 27 + 81 , the total digit sum would also be 1 + 3 + 9 + 27 + 81 = 121 1 + 3 + 9 + 27 + 81 = 121 , which makes the average digit sum of the first 121 numbers 121 121 = 1 \frac{121}{121} = \boxed{1}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...