Ternary

DOWNLOAD Mathematica Notebook

The base-3 method of counting in which only the digits 0, 1, and 2 are used. Ternary numbers arise in a number of problems in mathematics, including some problems of weighing. However, according to Knuth (1998), "no substantial application of balanced ternary notation has been made" (balanced ternary uses digits -1, 0, and 1 instead of 0, 1, and 2).

Ternary

The illustration above shows a graphical representation of the numbers 0 to 25 in ternary, and the following table gives the ternary equivalents of the first few decimal numbers. The concatenation of the ternary digits of the consecutive numbers 0, 1, 2, 3, ... gives (0), (1), (2), (1, 0), (1, 1), (1, 2), (2, 0), ... (OEIS A054635).

111110221210
221211022211
3101311123212
4111411224220
5121512025221
6201612126222
72117122271000
82218200281001
910019201291002
1010120202301010

Ternary digits have the following multiplication table.

×012
0000
1012
20211

A ternary representation can be used to uniquely identify totalistic cellular automaton rules, where the three colors (white, gray, and black) correspond to the three numbers 0, 1 and 2 (Wolfram 2002, pp. 60-70 and 886). For example, the ternary digits 0211020_3, lead to the code 600 totalistic cellular automaton.

Every even number represented in ternary has an even number (possibly 0) of 1s. This is true since a number is congruent mod (b-1) to the sum of its base-b digits. In the case b=3, there is only one digit (1) which is not a multiple of b-1, so all we have to do is "cast out twos" and count the number of 1s in the base-3 representation.

The following table gives 2^n for n=1, 2, ... in ternary.

2^1=2_3
(1)
2^2=11_3
(2)
2^3=22_3
(3)
2^4=121_3
(4)
2^5=1012_3
(5)
2^6=2101_3
(6)
2^7=11202_3.
(7)

N. J. A. Sloane conjectured that for any integer n>15, 2^n always has a 0 in its ternary expansion (Sloane 1973; Vardi 1991, p. 28). Known values of n such that 2^n lacks a 0 are 1, 2, 3, 4, 15 (OEIS A102483), with no others up to 10^5 (E. W. Weisstein, Apr. 8, 2006). The positions (counting from the least significant ternary digits) of the first 0 digit in (2^1)_3, (2^2)_3, ..., are 0, 0, 0, 0, 3, 2, 2, 4, 4, 5, 4, 2, 2, 4, 0, 3, 4, (OEIS A117971).

Similarly, 2^n always has a 1 in its ternary expansion except for n=1, 1, 3, and 9, with no others up to 10^5 (E. W. Weisstein, Apr. 8, 2006).

Erdős and Graham (1980) conjectured that no power of 2, 2^n, for n>8 is a sum of distinct powers of 3. This is equivalent to the requirement that the ternary expansion of 2^n always contains a 2 for n>8. The fact that the only values not having a two are n=2 and 8 has been verified by Vardi (1991) up to n=2·3^(20)=6.97×10^9. The positions (counting from the least significant ternary digits) of the first 2 digit in (2^1)_3, (2^2)_3, ..., are 1, 0, 1, 2, 1, 4, 1, 0, 1, 2, 1, 3, 1, 3, ... (OEIS A117970).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.