Exercise 2.1.8 (Unit digit of a square)

Prove that any number that is a square must have one of the following for its unit digit: 0 , 1 , 4 , 5 , 6 , 9 .

Answers

Proof. Let a be the last digit of an integer n . The following array gives the square of a modulo 10 .

a 0 1 2 3 4 5 6 7 8 9 a 2 mod 10 0 1 4 9 6 5 6 9 4 1

Since n a ( mod 10 ) , n 2 a 2 ( mod 120 ) , so n 2 must have one of the following for its unit digit: 0 , 1 , 4 , 5 , 6 , 9 . □

User profile picture
2024-08-21 10:12
Comments