Defineusing the inverse of for negative . Since , . Conversely, if then , so the definition of order gives . Two integers in the same block of consecutive integers cannot differ by a nonzero multiple of . Hence is one-to-one within each period.
Solved by gpt-5.6-sol high.
Codex Wiki