17. (GBR) A sequence of integers $a_{1}, a_{2}, a_{3}, \ldots$ is defined as follows: $a_{1}=1$, and for $n \geq 1, a_{n+1}$ is the smallest integer greater than $a_{n}$ such that $a_{i}+a_{j} \neq 3 a_{k}$ for any $i, j, k$ in $\{1,2, \ldots, n+1\}$, not necessarily distinct. Determine $a_{1008}$.
17. Initially, we determine that the first few values for $a_{n}$ are $1,3,4,7,10$, $12,13,16,19,21,22,25$. Since these are exactly the numbers of the forms $3 k+1$ and $9 k+3$, we conjecture that this is the general pattern. In fact, it is easy to see that the equation $x+y=3 z$ has no solution in the set $K=\{3 k+1,9 k+3 \mid k \in \mathbb{N}\}$. We shall prove that the sequence $\left\{\alpha_{n}\right\}$ is actually this set ordered increasingly.
Suppose $a_{n}>25$ is the first member of the sequence not belonging to $K$. We have several cases:
(i) $a_{n}=3 r+2, r \in \mathbb{N}$. By the assumption, one of $r+1, r+2, r+3$ is of the form $3 k+1$ (and smaller than $a_{n}$ ), and therefore is a member $a_{i}$ of the sequence. Then $3 a_{i}$ equals $a_{n}+1, a_{n}+4$, or $a_{n}+7$, which is a contradiction because $1,4,7$ are in the sequence.
(ii) $a_{n}=9 r, r \in \mathbb{N}$. Then $a_{n}+a_{2}=3(3 r+1)$, although $3 r+1$ is in the sequence, a contradiction.
(iii) $a_{n}=9 r+6, r \in \mathbb{N}$. Then one of the numbers $3 r+3,3 r+6,3 r+9$ is a member $a_{j}$ of the sequence, and thus $3 a_{j}$ is equal to $a_{n}+3$, $a_{n}+12$, or $a_{n}+21$, where $3,12,21$ are members of the sequence, again a contradiction.
Once we have revealed the structure of the sequence, it is easy to compute $a_{1998}$. We have $1998=4 \cdot 499+2$, which implies $\alpha_{1908}=9 \cdot 499+a_{2}=4494$.