
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
Let  $0 \leq k < n$  be integers and  $A=\{a \: : \: a \equiv k \pmod n \}.$  Find the smallest value of  $n$  for which the expression 
\[ \frac{a^m+3^m}{a^2-3a+1} \]
does not take any integer values for  $(a,m) \in A  \times \mathbb{Z^+}.$ 

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