Balanced ternary is a number system that uses three digit corresponding to the place values of , in contrast to ternary that uses .
The first numbers written in balanced ternary (using the "digits" ) are
decimal | balanced ternary |
The digit sum of a balanced ternary number can be calculated just like the normal digit sum, with the exception that corresponds to , so subtracting 1 in the digit sum. For example, the digit sum of is . 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
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.
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 grouping of balanced ternary numbers, and we find that we add an additional 3 n to the total digit sum each time. Since 1 2 1 = 1 + 3 + 9 + 2 7 + 8 1 , the total digit sum would also be 1 + 3 + 9 + 2 7 + 8 1 = 1 2 1 , which makes the average digit sum of the first 121 numbers 1 2 1 1 2 1 = 1