Here we consider the set S(n;t,s) of length n words a1a2···an over the alphabet consisting of the elements of the field F4 that have trace t and subtrace s. The trace of a word is the sum of its digits over the field F4 , i.e. t = a1+a2+ ··· +an. The subtrace is the sum of the products of all n(n-1)/2 pairs of digits taken over the field F4 , i.e. s = SUM( aiaj : 1 < i < j < n ).
Below we use x = RootOf( z2+z+1 ) and y = 1+x.
| (trace,subtrace) | ||||||||
| n | (0,0) | (0,1) (0,x) (0,y) | (1,0) (x,0) (y,0) | (1,1) (x,y) (y,x) | (1,x) (x,1) (y,1) (1,y) (x,x) (y,y) | |||
| 1 | 1 | 0 | 1 | 0 | 0 | |||
|---|---|---|---|---|---|---|---|---|
| 2 | 1 | 1 | 2 | 2 | 0 | |||
| 3 | 7 | 3 | 3 | 7 | 3 | |||
| 4 | 28 | 12 | 16 | 16 | 16 | |||
| 5 | 76 | 60 | 76 | 60 | 60 | |||
| 6 | 256 | 256 | 272 | 272 | 240 | |||
| 7 | 1072 | 1008 | 1008 | 1072 | 1008 | |||
| 8 | 4288 | 4032 | 4096 | 4096 | 4096 | |||
| 9 | 16576 | 16320 | 16576 | 16320 | 16320 | |||
| 10 | 65536 | 65536 | 65792 | 65792 | 65280 | |||
| 11 | 262912 | 261888 | 261888 | 262912 | 261888 | |||
| 12 | 1051648 | 1047552 | 1048576 | 1048576 | 1048576 | |||
| 13 | 4197376 | 4193280 | 4197376 | 4193280 | 4193280 | |||
| 14 | 16777216 | 16777216 | 16781312 | 16781312 | 16773120 | |||
| 15 | 67121152 | 67104768 | 67104768 | 67121152 | 67104768 | |||
S(n;t,s) = S(n-1;t,s) + S(n-1;t-1,s-(t-1)) + S(n-1;t-x,s-x(t-x)) + S(n-1;t-y,s-y(t-y))
= S(n-1;t,s) + S(n-1;t+1,s+t+1) + S(n-1;t+x,s+x(t+x)) + S(n-1;t+y,s+y(t+y))
Note that all operations involving operands t or s are carried out over GF(4).
