What is the mathematical explanation for this trick?
Solution 1:
- Let $n$ be the last digit of your mobile number.
- $2n$
- $2n+5$
- $50(2n+5)=100n+250$
- $100n+250+1764=100n+2014$ (fixed by Daniel R)
- Let $y$ be your year of birth. Then we have $100n+(2014-y)$.
Since $2014-y$ is your age (assumed to be $<100$), the hundreds digit is $n$ and the last two digits are your age.
Solution 2:
That's elementary. If $d$ is the last digit and $y$ your birth year, you are computing
$$(2d+1)50+1964-y=100d+2014-y.$$
The first term is the digit shifted two positions to the left (times $100$); the other two terms compute your age.
You'll have to increment the constant $1964$ every year, and the trick won't work for centenarians.
Solution 3:
$50(2x + 1) + 1964 - y = 100x + (2014 - y).$
If you were born before August 1st in year y, then (2014 - y) is your age. If you are under 100, then it's a 2-digit number. So the right-hand side of the equation is just a three digit number whose first digit is $x$ (doesn't matter what one-digit number $x$ we started with) and whose last two digits are your age.
edit: fixed lhs as per comments