Nothing Special   »   [go: up one dir, main page]

TOPICS
Search

Ternary


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).


See also

Base, Binary, Champernowne Constant, Decimal, Hexadecimal, Octal, Quaternary, Totalistic Cellular Automaton

Portions of this entry contributed by Vincenzo Origlio

Explore with Wolfram|Alpha

References

Erdős, P. and Graham, R. L. Old and New Problems and Results in Combinatorial Number Theory. Geneva, Switzerland: L'Enseignement Mathématique Université de Genève, Vol. 28, 1980.Gardner, M. "The Ternary System." Ch. 11 in The Sixth Book of Mathematical Games from Scientific American. Chicago, IL: University of Chicago Press, pp. 104-112, 1984.Knuth, D. E. The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 3rd ed. Reading, MA: Addison-Wesley, pp. 173-175, 1998.Lauwerier, H. Fractals: Endlessly Repeated Geometric Figures. Princeton, NJ: Princeton University Press, pp. 10-11, 1991.Sloane, N. J. A. Sequences A054635, A102483, A117970, and A117970 in "The On-Line Encyclopedia of Integer Sequences."Sloane, N. J. A. "The Persistence of a Number." J. Recr. Math. 6, 97-98, 1973.Vardi, I. "The Digits of 2^n in Base Three." Computational Recreations in Mathematica. Reading, MA: Addison-Wesley, pp. 20-25, 1991.Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, pp. 60-70 and 886, 2002.

Referenced on Wolfram|Alpha

Ternary

Cite this as:

Origlio, Vincenzo and Weisstein, Eric W. "Ternary." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Ternary.html

Subject classifications