A ternary notation

Eric Angelini keynews.tv at skynet.be
Thu Sep 15 12:27:05 CEST 2005


 Hello SeqFan and Math-Fun,
 Consider this (hope this is not old-hat):

   3^0  3^1  3^2  3^3  3^4  3^5  3^6  3^7 ...
=   1    3    9    27   81  243  729  2187 ...

This seq. is known to be very efficient if you
want to weigh integer weights with a two-tray
balance, leaving no "holes" behind; use weights
of 1,3,9,27... units to measure all "natural"
quantities, from 1 to infinity:

 1 = 1
 2 = 3-1
 3 = 3
 4 = 3+1
 5 = 9-(3+1)
 6 = 9-3
 7 = 9-(3-1)
 8 = 9-1
 9 = 9
10 = 9+1
11 = 9+(3-1)
12 = 9+3
13 = 9+(3+1)
14 = 27-[9+(3+1)]
etc.

I had the idea, yesterday night, to represent
all natural numbers in the same way -- all I
had to do was to use three symbols :
  0 for a power of 3 I don't need
  1 for a power of 3 I need
  2 as a grahic symbol meaning "minus all the
    rest"
... and use a regular addition rule (which
will be explained below in a few seconds).

Let's make first a parallel with the binary no-
tation :

   2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
=   1    2    4    8    16   32   64  128 ...

We use two symbols :
0 for a power of 2 we don't need
1 for a power of 2 we need
... and an easy addition rule.

We start from the left, putting 0's and 1's
where we want to, and then reverse the sequence
of 0's and 1's. To represent 54 (my age) we
look for the closest power < or = to 54 and
mark it with a "1":

   2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
=   1    2    4    8    16   32   64  128 ...
-->                          1

54 - 32 = 22; we mark with another "1" the
closest power < or = to 22:

   2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
=   1    2    4    8    16   32   64  128 ...
-->                      1   1

54 - (32+16) = 6, we mark accordingly 2^2:

   2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
=   1    2    4    8    16   32   64  128 ...
-->           1          1   1

54 - (32+16+4) = 2, we mark 2^1:

   2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
=   1    2    4    8    16   32   64  128 ...
-->      1    1          1   1

To complete the binary representation of 54,
we put 0's under all unnecessary powers:

   2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
=   1    2    4    8    16   32   64  128 ...
--> 0    1    1    0     1   1

... last line is reversed to produce 110110,
which is indeed the binary expression of 54.

We can represent all natural integers with
this method, of course:

    2^0  2^1  2^2  2^3  2^4  2^5  2^6  2^7 ...
 =   1    2    4    8    16   32   64  128 ...

 1 = 1                  => 1
 2 = 0    1 (to reverse)=> 10
 3 = 1    1             => 11
 4 = 0    0    1        => 100
 5 = 1    0    1        => 101
 6 = 0    1    1        => 110
 7 = 1    1    1        => 111
 8 = 0    0    0    1   => 1000
 9 = 1    0    0    1   => 1001
etc.

Let's do the same with the powers of 3; we will
mark with a "1" the powers we need, with a "0"
the ones we will discard and (novelty!) with
a "2" the quantity we will substract (I will
use the star symbol (*) to indicate hereunder
an operation in base 10):

   3^0  3^1  3^2  3^3  3^4  3^5  3^6  3^7 ...
=   1    3    9    27   81  243  729  2187 ...

 1 = 1
 2 = *3-1* = 121
 3 = 01 => 10
 4 = *3+1* = 11
 5 = *9-4* = 1211
 6 = *9-3* = 1210
 7 = *9-2* = 12121
 8 = *9-1* = 1201
 9 = 001 => 100
10 = *9+1* = 101
11 = *9+2* = 1121
12 = *9+3* = 110
13 = *9+4* = 111
14 = *27-13* = 12111
15 = *27-12* = 12110
16 = *27-11* = 121121
17 = *27-10* = 12101
18 = *27-9* = 12100
19 = *27-8* = 121201
20 = *27-7* = 1212121
21 = *27-6* = 121210
22 = *27-5* = 121211
23 = *27-4* = 12011
24 = *27-3* = 12010
25 = *27-2* = 120121
26 = *27-1* = 12001
27 = 0001 => 1000
28 = *27+1* = 1001
29 = *27+2* = 10121
30 = *27+3* = 10010
etc.

Is this of interest?
Is the introduction of a third symbol "economi-
cally" efficient? (I think we will use less
symbols to represent all first 1000 natural
integers with this "ternary notation" than with
the usual binary system -- the price might be
to high, though)...
Speaking of "notation efficiency" (how to re-
present in the less "symbol-consuming" way all
the natural numbers) -- is there a definitive
answer?
The "ternary notation" above can certainly be
bettered as the "ternary artefacts" 20, 1220,
001 or 002 represent nothing.

Best,
É.

(seq. 0,1,121,10,11,1211,1210,12121,1201,100,...
 is not in the OEIS)







More information about the SeqFan mailing list