Why do the remainders of this product form a parabola?

93 Views Asked by At

If we plot the remainders $a b \bmod n$ for $a, b, n \in \mathbb{Z}_{>0}$ such that $a < n < b$ where $a$ and $b$ are fixed, in many cases, the points lie exactly on the parabola given by quadratic equation $y = (a - x)(b - x) + x$ when $x = n$.

In particular, it can be proven that this always happens if $a = c^2$ and $b = (c+1)^2$ for some $c \in \mathbb{Z}_{>0}$.

Is there any nice informal explanation for this phenomenon? It's easy enough to derive a sufficient and necessary condition for it using $(a \bmod n) = a - n\lfloor\frac{a}{n}\rfloor$, but it's not pretty.

Graph of (a - x)(b - x) + x = 0 and ab mod n

1

There are 1 best solutions below

4
On

(I may not fully understand what you're going for. This is my interpretation).

Claim: If $-n \leq ( a - n)(b - n) < 0$, then the reduced residue class of $ ab $ is $(a-b)(b-n) + n$

This follow by observing that $ ab \equiv a(b-n) \equiv (a-n)(b-n) \equiv (a-n)(b-n) + n$, and that $ 0 \leq (a-n)(b-n) +n < n$.


In particular, if $ c^2 < n < (c+1)^2$, then we WTS $ - n \leq n^2 - (2c^2 + 2c + 1) n + c^2(c+1)^2$.
Check that the discriminant is $ (2c^2 + 2c) ^ 2 - 4 \times 1 \times c^2 (c+1)^2 \geq 0$, hence the inequality holds (with equality when $ n = c(c+1)$.