Skip to main content
3 of 3
edited tags
GH from MO
  • 105.4k
  • 8
  • 293
  • 398

How many pairs of numbers between 0 and n-1 are equal to z mod n?

I want to know how to compute this function:

$f : \mathbb{Z}_m \rightarrow \mathbb{N}$

$f(z) = |\{ (x, y) \in \mathbb{Z}_m^2 \mid xy \equiv z \}|$