
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 \( n \geq 1 \) be a positive integer. We say that an integer \( k \) is a fan of \( n \) if \( 0 \leq k \leq n-1 \) and there exist integers \( x, y, z \in \mathbb{Z} \) such that
\[ 
\begin{aligned}
x^2 + y^2 + z^2 &\equiv 0 \pmod{n}; \\
xyz &\equiv k \pmod{n}.
\end{aligned}
\]
Let \( f(n) \) be the number of fans of \( n \). Determine \( f(2020) \).

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