It's clever but actually not so complicated.
<Nerd Mode = 'On'>
- - Step 3,5 and 9: The first 3 digits get multiplied first by 80 and then by 250 which is 20000
At the end it will be divided by 2 meaning that the first 3 digits will have been multiplied by 10000 (simply put they have 4 trailing zeros)
- Step 4 and 5 are cancelled by step 8 (with 4 and 5 you add 250, at step 8 you subtract it again)
- Step 6 and 7 and 9 : you add twice the last 4 digits and divide them by two meaning you add only once the last 4 digits.
So we have the first 3 digts followed b4 zeros with last 4 digits added, yes this should always be the same number
But as far as I can see this will only work with a 7 digit number
</Nerd Mode>