Elementary Number Theory Problems 4.3 Solution (David M. Burton's 7th Edition) - Q8


Background

All theorems, corollaries, and definitions listed in the book's order:

Theorems and Corollaries in Elementary Number Theory
All theorems and corollaries mentioned in David M. Burton’s Elementary Number Theory are listed by following the book’s order. (7th Edition) (Currently Ch 1 - 4)

I will only use theorems or facts that are proved before this question. So, you will not see that I quote theorems or facts from the later chapters.

Question

For any integer $a$, show that $a^2 - a + 7$ ends in one of the digits $3, 7$, or $9$.

Solution

We can write $a = q_{m}10^{m} + q_{m - 1}10^{m - 1} + \cdots + q_{2}10^{2} + q_{1}10 + q_{0}$.