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