Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.1.6 (Minimum value of $|n^2 - 17x|$, where $x \in \mathbb{Z}$.)
Exercise 3.1.6 (Minimum value of $|n^2 - 17x|$, where $x \in \mathbb{Z}$.)
- (a)
- List the quadratic residues of each of the primes .
- (b)
- For any positive integer , define to be the minimum value of , where runs over all integers. Prove that is either or a power of .
Answers
Proof.
- (a)
-
List of quadratic residues of each of the primes
:
At the exception of , these primes are of the form , thus is a quadratic residue, thus if is a quadratic residue modulo , so is .
sage: def least_remainder(a,b): ....: r = a % b ....: if 2 * r > b: ....: r = r - b ....: return r ....: sage: p = 37 sage:l = [least_remainder(n^2, p) for n in range(1 + (p-1) // 2)]; l.sort(); l [-16, -12, -11, -10, -9, -7, -4, -3, -1, 0, 1, 3, 4, 7, 9, 10, 11, 12, 16] - (b)
-
Let
a fixed positive integer. The Euclidean division of
by
give
such that
Define by
Since , in both cases,
(We call the least remainder in the division of by .)
We prove that
Indeed, let
Then . If , where , then for some integer . Then
Define to be the minimum value of , where runs over all integers. We have proved that , where is the least remainder of by .
Since , , so is zero, or a quadratic residue modulo . Since is a quadratic residue modulo , is zero, or a quadratic residue modulo , and . By part (a),
This shows that is either or a power of .