Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 1.3.8 (A test for divisibility by $7$.)
Exercise 1.3.8 (A test for divisibility by $7$.)
A test for divisibility by . Starting with any positive integer , subtract double the units digit from the integer obtain from by removing the unit digit, giving a smaller integer . For example, if with unit digit , we subtract from to get . The problem is to prove that if either or is divisible by , so is the other. This gives a test for divisibility by by repeating the process. From we pass to , then to by subtracting from , and then to by subtracting from . Since is not divisible by , neither is .
Answers
Proof. Let . The integer obtained by removing the unit digit is
Then
Now we prove
( is the inverse of modulo .)
Indeed, is an integer, and since is prime with ,
Since the last proposition is true, this shows that
Therefore if and only if , if and only if . If either or is divisible by , so is the other. □