|
EXAMPLE
|
The following Gray codes of length 10 contain only the numbers between 0 and 9:
0, 2, 3, 7, 6, 4, 5, 1, 9, 8;
0, 2, 6, 4, 5, 7, 3, 1, 9, 8;
0, 4, 5, 7, 6, 2, 3, 1, 9, 8;
0, 4, 6, 2, 3, 7, 5, 1, 9, 8;
0, 8, 9, 1, 3, 2, 6, 7, 5, 4;
0, 8, 9, 1, 3, 7, 5, 4, 6, 2;
0, 8, 9, 1, 5, 4, 6, 7, 3, 2;
0, 8, 9, 1, 5, 7, 3, 2, 6, 4.
Therefore a(5) = 8.
|