Finding the number of solutions of a congruence
Source: Baltic Way 2020, Problem 18
November 14, 2020
number theorynumber theory proposedAZE CMO TSTAZE EGMO TST
Problem Statement
Let be a positive integer. We say that an integer is a fan of if and there exist integers such that
\begin{align*}
x^2+y^2+z^2 &\equiv 0 \pmod n;\\
xyz &\equiv k \pmod n.
\end{align*}
Let be the number of fans of . Determine .