Skip to main content
2 of 3
Had a mistake

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 \}|$