Hi Kashif,
I saw your post and your question as to whether the math trick has anything to do with the number 6174. It doesn't. The trick is based on adding a complementary value to each of your friend's values to ensure that the final sum will be the same as the predicted sum. I'll explain why.

The predicted sum will always be accurate because it's fixed that way, by the choice of the number you always add under your friend's number to make it add up to a number composed of all 9's.

So let 'n' denote the number of digits in the number on line 1.

There will be 18 blank lines below this number.
The final sum is predicted as 9<digits of original number up until the final two, final two digits - 9>.

Each of the 9 pairs of numbers (your friend's and yours) will always be n 9's long, as defined by your rules because you're choosing YOUR number to make this happen, dependent on the number your friend writes down.
This means that there will be 9 pairs of numbers whose sum is composed of n 9's. Which is the same as saying there will be 9 pairs whose sum is 10^n - 1, which is 9 * (10^n - 1), which is the same as inserting a 9 to the beginning of the original number, and then subtracting 9 from the result.

In other words, for a 4 digit number, you're making each pair of numbers add to 10000 - 1 = 9999, and this is the same as adding 10000 nine times, and then subtracting 1 nine times, once for each pair of numbers (your friend's and yours). So you end up adding 90000 and then subtracting 9, which you do in step 4.

For example, with a 4 digit number (like in your example), where w, x, y and z can be any 4 digits, and wxuv is the number wxyz minus 9 as you describe in step 4, and you get this:
line 1: wxyz
line 2 & 3:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 4 & 5:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 6 & 7:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 8 & 9:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 10 & 11:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 12 & 13:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 14 & 15:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 16 & 17:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
line 18 & 19:+ 9999 = 10000 - 1 your friend's number + your number : 9999 = 10000 - 1
------ ------ ---
line 20: 9wxuv = wxyz + 90000 - 9 which is what your forced prediction of the sum is.

I hope this helps explain why your math trick results in the predicted sum the way it does. Good luck in life and I hope your interest in math never fades.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.