
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given the sequence \(\{a_{n}\}\) such that
\[
\begin{array}{l}
a_{1}=a_{2}=1, a_{3}=m, \\
a_{n+1}=\frac{k+a_{n} a_{n-1}}{a_{n-2}}(n \geqslant 3),
\end{array}
\]
where \(k, m \in \mathbf{Z}_{+}\), and \((k, m)=1\). What should \(k\) be so that, for any \(n \in \mathbf{Z}_{+}\), \(a_{n}\) is always an integer?

Present the answer in LaTex format: \boxed{Your answer}
user