A problem from the 1996 Georg Mohr mathematics competition in Denmark:

n is a positive integer. The next-to-last digit in the decimal expression

of n^2 is 7.

What’s the last digit?

Please provide your reasoning, not only the digit.

n = {…xy} where {} means concatenates digits

n^2 = {…7m}

where m is one of (0,…9)

sup. y^2 = {b1 b2}

xy = {c1 c2}

set up the n^2 multiplication in the grade school way:

{ …x y}

X { …x y}

_______________ notes:

(c2) [carries for x (xy)]

(c1) (b1) [carries for y (xy)]

c2 b2 [y(xy)]

+ c2 [x(xy)]

___________________________

… 7 m

{… 7} = b1 + 2 c2, so b1 must be odd

the squares from 1 digit integers that have an odd ten’s place are (16 and 36) = y^2 = {b1 b2}

b2 is the ones place of y^2, so, b2 = m = 6. n^2 ends in 76

*Edited on ***November 12, 2018, 5:48 pm**