A sequence of integers
![a_{1},a_{2},a_{3},\ldots](/media/m/3/e/c/3ec1fb307c03974c6635f8bd6b1d36a1.png)
is defined as follows:
![a_{1} = 1](/media/m/8/f/1/8f179b8165c28dde29b45adc6494ef70.png)
and for
![n\geq 1](/media/m/6/0/b/60b196d3e8aa7fce08d72404eea76d0e.png)
,
![a_{n + 1}](/media/m/6/a/f/6afa9219fd0821cc78328129bbc4f978.png)
is the smallest integer greater than
![a_{n}](/media/m/e/1/b/e1bf963ddae5d084fba54d8a7aa04acc.png)
such that
![a_{i} + a_{j}\neq 3a_{k}](/media/m/d/b/1/db107e10bfc6f1f67c2461ad60d22ba1.png)
for any
![i,j](/media/m/6/2/1/621e78d5965ee9a0a0b2a20f342c7f9d.png)
and
![k](/media/m/f/1/3/f135be660b73381aa6bec048f0f79afc.png)
in
![\{1,2,3,\ldots ,n + 1\}](/media/m/6/b/3/6b3db2c2c3d94203bdd10a7723daf885.png)
, not necessarily distinct. Determine
![a_{1998}](/media/m/6/c/2/6c2a1fe46e569b99514799dadb173496.png)
.
%V0
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 3a_{k}$ for any $i,j$ and $k$ in $\{1,2,3,\ldots ,n + 1\}$, not necessarily distinct. Determine $a_{1998}$.