Images of 27x27 table of tersums (like Nim-sums but base 3)

Gerald McGarvey Gerald.McGarvey at comcast.net
Sun Dec 31 22:18:48 CET 2006


tersums are like Nim-sums but base 3 is used instead of base 2,
see sequence A004489, 'write m and n in base 3 and add mod 3 with no carries'
http://www.research.att.com/~njas/sequences/A004489

Below are images based on a table of tersums for n and m from 0 to 26.

1d4608fe.jpg


PARI code used to calculate the values:
M=matrix(27,27); for(i=1,27,for(j=1,27,A = vector(4); B = vector(4); C = 
vector(4); a = i-1; b = j-1;
for(n=1,3,A[5-n]=floor(a/3^(4-n));a=a-A[5-n]*3^(4-n));A[1]=a;
for(n=1,3,B[5-n]=floor(b/3^(4-n));b=b-B[5-n]*3^(4-n));B[1]=b;
for(n=1,4,C[n]=(A[n]+B[n])%3);
M[i,j]=sum(n=1,4,C[n]*3^(n-1))))

I would think that ter-multiplication etc. is or could be defined similarly to
the way Nim-multiplication is defined. Is that correct? If so, is there some
practical significance?

The tersum values:

  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 
25 26
  1  2  0  4  5  3  7  8  6 10 11  9 13 14 12 16 17 15 19 20 18 22 23 21 25 
26 24
  2  0  1  5  3  4  8  6  7 11  9 10 14 12 13 17 15 16 20 18 19 23 21 22 26 
24 25
  3  4  5  6  7  8  0  1  2 12 13 14 15 16 17  9 10 11 21 22 23 24 25 26 18 
19 20
  4  5  3  7  8  6  1  2  0 13 14 12 16 17 15 10 11  9 22 23 21 25 26 24 19 
20 18
  5  3  4  8  6  7  2  0  1 14 12 13 17 15 16 11  9 10 23 21 22 26 24 25 20 
18 19
  6  7  8  0  1  2  3  4  5 15 16 17  9 10 11 12 13 14 24 25 26 18 19 20 21 
22 23
  7  8  6  1  2  0  4  5  3 16 17 15 10 11  9 13 14 12 25 26 24 19 20 18 22 
23 21
  8  6  7  2  0  1  5  3  4 17 15 16 11  9 10 14 12 13 26 24 25 20 18 19 23 
21 22
  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 
26  0  1  2  3  4  5  6  7  8
10 11  9 13 14 12 16 17 15 19 20 18 22 23 21 25 26 
24  1  2  0  4  5  3  7  8  6
11  9 10 14 12 13 17 15 16 20 18 19 23 21 22 26 24 
25  2  0  1  5  3  4  8  6  7
12 13 14 15 16 17  9 10 11 21 22 23 24 25 26 18 19 
20  3  4  5  6  7  8  0  1  2
13 14 12 16 17 15 10 11  9 22 23 21 25 26 24 19 20 
18  4  5  3  7  8  6  1  2  0
14 12 13 17 15 16 11  9 10 23 21 22 26 24 25 20 18 
19  5  3  4  8  6  7  2  0  1
15 16 17  9 10 11 12 13 14 24 25 26 18 19 20 21 22 
23  6  7  8  0  1  2  3  4  5
16 17 15 10 11  9 13 14 12 25 26 24 19 20 18 22 23 
21  7  8  6  1  2  0  4  5  3
17 15 16 11  9 10 14 12 13 26 24 25 20 18 19 23 21 
22  8  6  7  2  0  1  5  3  4
18 19 20 21 22 23 24 25 26  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 
16 17
19 20 18 22 23 21 25 26 24  1  2  0  4  5  3  7  8  6 10 11  9 13 14 12 16 
17 15
20 18 19 23 21 22 26 24 25  2  0  1  5  3  4  8  6  7 11  9 10 14 12 13 17 
15 16
21 22 23 24 25 26 18 19 20  3  4  5  6  7  8  0  1  2 12 13 14 15 16 17  9 
10 11
22 23 21 25 26 24 19 20 18  4  5  3  7  8  6  1  2  0 13 14 12 16 17 15 10 
11  9
23 21 22 26 24 25 20 18 19  5  3  4  8  6  7  2  0  1 14 12 13 17 15 16 
11  9 10
24 25 26 18 19 20 21 22 23  6  7  8  0  1  2  3  4  5 15 16 17  9 10 11 12 
13 14
25 26 24 19 20 18 22 23 21  7  8  6  1  2  0  4  5  3 16 17 15 10 11  9 13 
14 12
26 24 25 20 18 19 23 21 22  8  6  7  2  0  1  5  3  4 17 15 16 11  9 10 14 
12 13

I've got tables and images of Nim-multiplication and Nim-powers for n and m
from 0 to 255. They are fascinating but a bit large for an email and need some
more checking. I'll try to put them on a web site. I'm working on a table of
Nim-multiplication for powers of 2, so far for 1 to 2^8:
   1   2    4    8   16   32    64   128   256
   2   3    8   12   32   48   128   192   512
   4   8    6   11   64  128    96   176  1024
   8  12   11   13  128  192   176   208  2048
  16  32   64  128   24   44    75   141  4096
  32  48  128  192   44   52   141   198  8192
  64 128   96  176   75  141   103   185 16384
128 192  176  208  141  198   185   222 32768
256 512 1024 2048 4096 8192 16384 32768   384

Happy New Year!
Gerald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.seqfan.eu/pipermail/seqfan/attachments/20061231/4f5e7549/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1d4608fe.jpg
Type: image/jpeg
Size: 86942 bytes
Desc: not available
URL: <http://list.seqfan.eu/pipermail/seqfan/attachments/20061231/4f5e7549/attachment-0001.jpg>


More information about the SeqFan mailing list