Forum Moderators: open
Recognize the number? ;)
Note: This only works with US/Canada style phone numbers...
ABC-DEFG = A*1,000,000+B*100,000+C*10,000+D*1,000+E*100+F*10+G
ABC = A*100+B*10+C*1
DEFG = D*1000+E*100+F*10+G*1
((((ABC)*80+1)*250+2*(DEFG))-250)/2 = (((((A*100+B*10+C*1)*80+1)*250+2*(D*1000+E*100+F*10+G*1))-250)/2 = ((((A*8000+B*800+C*80+1)*250+(D*2000+E*200+F*20+G*2))-250)/2 = ((A*2000000+B*200000+C*20000+250+D*2000+E*200+F*20+G*2)-250)/2 = (A*2000000+B*200000+C*20000+D*2000+E*200+F*20+G*2)/2 = A*1,000,000+B*100,000+C*10,000+D*1,000+E*100+F*10+G = ABC-DEFG it's friday ;)
So, if a is the first three digits, b the last four and x the full number, you change the steps into an equation:
x = {(80a + 1)250 + 2b - 250}/2 You can them simplify down the equation:
x = (20000a + 250 + 2b - 250)/2 x = (20000a + 2b)/2 x = 10000a + b Quod erat demonstrandum. Or something like that...!
Thanks to DrDoc for getting my very rusty mathematics skills back into action!
<added>Beaten to it again! Chndru's explanation was much cooler than mine ;)</added>
I then switched the Window's Calculator to the scientific function and tried the math again.
While using the scientific function, I would continually receive the wrong answer.
Could someone proof this and write back? Thanks.
I just tried my work phone w/ scientific and it came out incorrect.
<snip>
[edited by: lawman at 7:53 pm (utc) on May 27, 2004]
[edit reason] No phone numbers please [/edit]