The Balanced Ternary Number System

Suppose you have a two pan balance and gram weights, one for each power of three: 1 3, 9, 27, ... . Given a weight, say 21 grams, you can measure it by putting the 27 and 3 on one pan and the 9 on the other. So
21 = 27(1) + 9(-1) + 3(1) + 1(0)

The sequence of multipliers {1, -1, 1, 0} is the balanced ternery representation of 21. In general, a balance ternery representation is a sequence {an,...a2,a1,a0} where each aj is -1,0, or 1; and the value of aj is interpreted as follows:

  • Enter an integer::

_
_
Script generated by MSPWizard.nb

Ken Levasseur
Mathematical Sciences
UMass Lowell
Kenneth_Levasseur@uml.edu
Ken's WebMathematica Scripts