
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
For positive integers  $n, m$  define  $f(n,m)$  as follows. Write a list of  $ 2001$  numbers  $a_i$ , where  $a_1 = m$ , and  $a_{k+1}$  is the residue of  $a_k^2$    $mod \, n$  (for  $k = 1, 2,..., 2000$ ). Then put  $f(n,m) = a_1-a_2 + a_3 -a_4 + a_5- ... + a_{2001}$ . For which  $n \ge 5$  can we find m such that  $2 \le  m \le n/2$  and  $f(m,n) > 0$ ?

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