Last week, I set the following problem - A digit reversal, which confused many people (esp if you read the solutions). A high proportion of people first gave an answer of around 960. Many even claimed that 959 is the correct answer, and gave the following justification:

Since \( T^2 - S^2 = (T-S) (T+S)\), we can check that the last three digits of \( T+S\) are 421 and the last three digits of \( T-S\) are 779. Hence, the last three digits of \( T^2 - S^2 \) are obtained from \( (T+S) \times (T-S) = 421 \times 779 = 327959 \). Thus the answer is 959.

**What is wrong with the above solution? What was the wrong assumption / misconception that was made?**

(Note that I am not asking for your solutions; you can view the solution discussion for different approaches.)

Here are some questions to guide you.

1. What is the remainder when 123 is divided by 1000?

2. What is the remainder when -123 is divided by 1000?

3.
What are the last three digits of 123?

4. What are the last three digits of -123?

5. What is \( 123 \pmod{1000} \)?

6. What is \( -123 \pmod{1000} \)?

## Comments

Sort by:

TopNewestI'm confused, how does one even get \(T - S\) = 779? If you consider the numbers \( \pmod {1000} \) then you get \(T = 321, S = 100\) thus \(T - S = 221\) and \(T + S = 421\)? I'm confused as to how you can even get 779 as an answer (I realize it's \(-221 \pmod {1000}\) but I still don't know how you would get that). I'm probably missing something obvious.

As for the solution you posted, the problem is that \(T^2 - S^2\) is negative, thus even though the last 3 digits of it are \(959\), \( -959 \equiv 41 \pmod {1000}\). – Michael Tong · 3 years, 11 months ago

Log in to reply

When trying to determine the last 3 digits of a number, you need to look at several of the last values. I believe that they looked at the last few digits, namely \( 4321 - 9100 = - 4779\) or \( 54321 - 99100 = -44779 \), to 'conclude' that it must be 779.

I'm not commenting if 779 is indeed the last 3 digits, merely on my interpretation of the writeup. – Calvin Lin Staff · 3 years, 11 months ago

Log in to reply

The idea behind keeping the last 3 digits is to find the remainder after dividing by 1000, i.e. mod 1000. However the last 3 digits are not (mod 1000) for negative numbers.

(T+S) is positive, so its (mod 1000) is the same as its last 3 digits, 421.

(T-S) is negative, so its (mod 1000) is not the same as its last 3 digits but rather 1000 - 779 = 221.

Continuing with the method we get:

\(421\times 221=93041\) with last 3 digits 41. – Louie Tan Yi Jie · 3 years, 11 months ago

Log in to reply

But \(S^2\) is divided evenly by \(1000\) (you can stretch that to \(10,000\), since \(100\) divides \(S\), but that is unneccesary), so we really only need the remainder of \(T^2\), which is easily checked to be \(41\). Right? – Arthur Mårtensson · 3 years, 11 months ago

Log in to reply

I'm asking for explanations of why the stated solution was wrong, and what misconception / assumption was made. How can we avoid such mistakes in future? – Calvin Lin Staff · 3 years, 11 months ago

Log in to reply

The last 3 digits of T-S are 221, not 779. 321-100=221 – Mani Jha · 3 years, 11 months ago

Log in to reply

What are the last 3 digits of \( 4321 - 9100 \)? Why is there a sudden change? – Calvin Lin Staff · 3 years, 11 months ago

Log in to reply

– Mani Jha · 3 years, 11 months ago

Oh, I was wrong.Since T<S, the last digits of \(T-S\) will be equal to the last digits of \(-(S-T)\). So, it will be 779. So, the answer will be 959 indeed. Thanks for making it clear!Log in to reply

– Mani Jha · 3 years, 11 months ago

But Since \(T^2-S^2\) is a negative number, dividing by 1000 will give remainder -959. Isn't it?Log in to reply

\(-1959(mod 1000)=(41)(mod 1000)-(2000)(mod 1000)\) \(=41\) So, answer must be 41 for the case at hand too – Mani Jha · 3 years, 11 months ago

Log in to reply

At the end of the day you should be able to explain why one answer is correct, and the reason why you thought the wrong answer was correct. – Calvin Lin Staff · 3 years, 11 months ago

Log in to reply

you did it correctly then why is it coming different – Shashank Goel · 3 years, 11 months ago

Log in to reply