0

From Rosen's Discrete Math Textbook:

Formulate a conjecture about the final decimal digit of the square of an integer and prove your result.

Solution: The smallest perfect squares are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, and so on. We notice that the digits that occur as the final digit of a square are 0, 1, 4, 5, 6, and 9, with 2, 3, 7, and 8 never appearing as the final digit of a square. We conjecture this theorem: The final decimal digit of a perfect square is 0, 1, 4, 5, 6, or 9. How can we prove this theorem?

We first note that we can express an integer n as 10a + b, where a and b are positive integers and b is 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. Here a is the integer obtained by subtracting the final decimal digit of n from n and dividing by 10. Next, note that $(10a + b)^{2}$ = 100$a^{2}$ + 20ab + $b^{2}$ = 10(10$a^{2}$ + 2b) + $b^{2}$, so that the final decimal digit of $n^{2}$ is the same as the final decimal digit of $b^{2}$. Furthermore, note that the final decimal digit of $b^{2}$ is the same as the final decimal digit of $(10 − b)^{2}$ = 100 − 20b + $b^{2}$. Consequently, we can reduce our proof to the consideration of six cases.

Case (i): The final digit of n is 1 or 9. Then the final decimal digit of $n^{2}$ is the final decimal digit of $1^{2}$ = 1 or $9^{2}$ = 81, namely, 1.

Case (ii): The final digit of n is 2 or 8. Then the final decimal digit of $n^{2}$ is the final decimal digit of $2^{2}$ = 4 or $8^{2}$ = 64, namely, 4.

Case (iii): The final digit of n is 3 or 7. Then the final decimal digit of $n^{2}$ is the final decimal digit of $3^{2}$ = 9 or $7^{2}$ = 49, namely, 9.

Case (iv): The final digit of n is 4 or 6. Then the final decimal digit of $n^{2}$ is the final decimal digit of $4^{2}$ = 16 or $6^{2}$ = 36, namely, 6.

Case (v): The final decimal digit of n is 5. Then the final decimal digit of $n^{2}$ is the final decimal digit of $5^{2}$ = 25, namely, 5.

Case (vi): The final decimal digit of n is 0. Then the final decimal digit of $n^{2}$ is the final decimal digit of $0^{2}$ = 0, namely, 0.

Because we have considered all six cases, we can conclude that the final decimal digit of $n^{2}$, where n is an integer is either 0, 1, 4, 5, 6, or 9.

My questions/confusions are on the bolded parts:

Question 1: Although they mention a and b are positive integers, meaning I assume they're implicitly saying we're only considering positive integers (since a negative n squared is same as positive n squared), the statement "here a is the integer obtained by subtracting the final decimal digit of n from n and dividing by 10" would be incorrect if n was negative, correct?

Question 2: I'm not understanding the part "furthermore, note that the final decimal digit of $b^{2}$ is the same as the final decimal digit of $(10 − b)^{2}$ = 100 − 20b + $b^{2}$." since $100 − 20b + b^{2} = 10(10 - 2b) + b^{2}$, where (10 - 2b) is negative when $b \geq 6$. But I thought from the quote "We first note that we can express an integer n as 10a + b, where a and b are positive integers and b is 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.", that "a" should be positive. How does this affect the analysis here?

Kindly please help me and let me know.

  • Not an answer, but related: https://math.stackexchange.com/questions/2795029, https://math.stackexchange.com/questions/3616969, https://math.stackexchange.com/questions/727203, https://math.stackexchange.com/questions/4030942 – Anne Bauval May 25 '24 at 21:00
  • Are you familiar with modular arithmetic (congruences)? – Bill Dubuque May 25 '24 at 21:41
  • See here in the dupe for a more precise form of this argument. – Bill Dubuque May 25 '24 at 21:45
  • @BillDubuque No I am, but I'm not understanding how the question "The square of an integer is congruent to 0 or 1 mod 4" is same as my 2 questions here. My questions were trying to parse out the textbook's argument that doesn't use modular arithmetic. – Bob Marley May 25 '24 at 22:03
  • Yes, he's assuming $n>0$ but the argument only requires a Euclidean division $,n = 10a+b,,$ where $,0\le b< 10,$ (or $,0\le |b| \le 5,$ using balanced (signed) residues). There is no need to mention anything about "digits" (doing so may needlessly restrict the argument). For $,n<0,$ the quotient $,b,$ will be negative, but the remainder still lies in said range (and the argument uses only the remainder - that's the point of modular arithmetic - to ignore unneeded quotients and focus on the arithmetic of remainders (residues). – Bill Dubuque May 25 '24 at 22:07
  • The argument is exactly the same for any modulus. Please carefully read the linked answer. You can safely ignore Rosen's sloppy remarks about digits. The key point is to learn to think of it in terms of modular arithmetic, i.e. $\bmod 10!:\ n\equiv b ,\Rightarrow, n^2\equiv b^2.,$ Here we have $,b = (n\bmod 10) =$ remainder of $,n\div 10,$ but the prior inference holds for any integer $,b\equiv n\pmod{!10}.,$ – Bill Dubuque May 25 '24 at 22:19
  • Choosing $,b,$ to be the least positive (or least magnitude) residue allows us to reduce the proof to analyzing a finite number of cases (for all residues in a complete residue system). – Bill Dubuque May 25 '24 at 22:19

0 Answers0