Hold onto your diapies babies. Here we go:

Let abc be the three digit number we choose, with the stipulation that 'a' and 'c' differ by at least 2

abc is really 100a + 10b + c

reverse the number we get 100c + 10b + c

Subtract them: (assume, w/o loss of generality, that abc is the larger)

100a + 10b + c - (100c + 10b + a) = 100(a-c) + (c-a) but c-a is negative so we must do a little slight of hand to change this back to a decimal number.

= 100(a - c) + c - a = 100(a - c - 1) + 10(9) + (10 + c - a)

Check it out for yourself

Reverse these and add

100(a - c - 1) + 10(9) + (10 + c - a) + 100(10 + c - a) + 10(9) + (a - c - 1) =

100(10 - 1) + 10(18) + (10 - 1) = 1089

Now, you might ask, why was it necessary for 'a' and 'c' to differ by at least 2.

Case 1 a = c then abc = cba and abc - cba = 0 and we can't continue.

Case 2 a = c + 1 (differs by 1) then with a little arithmetic we see the difference is a two digit number and our process breaks down.

I hope that made things crystal clear.

Live long and prosper.

## No comments:

## Post a Comment