My youngest and I are heading into Philadelphia tonight for a chocolate dessert feast, so it seems apt that a friend sent me this bit of mathematical magic this morning - with a plea to explain how it works.

Chocolate Calculator:

This is pretty neat. Don’t say your age; you will probably lie anyway!

DON’T CHEAT BY SCROLLING DOWN FIRST

It takes less than a minute. Work this out as you read.

Be sure you don’t read the bottom until you’ve worked it out!

- First of all, pick the number of times a week that you would like to have chocolate (more than once but less than 10)
- Multiply this number by 2 (just to be bold)
- Add 5
- Multiply it by 50 — I’ll wait while you get the calculator
- If you have already had your birthday this year add 1759. If you haven’t, add 1758.
- Now subtract the four digit year that you were born.
You should have a three digit number

The first digit of this was your original number (i.e., how many times you want to have chocolate each week).

The next two numbers are YOUR AGE! (Oh YES, it is!!!!!)

THIS IS THE ONLY YEAR (2009) IT WILL EVER WORK, SO SPREAD IT AROUND WHILE IT LASTS!

So how does it work?

Expressed algebraically, the procedure if you have had your birthday can be written as:

50 (2n +5) + 1759 - y

where n is the number you chose and y the year you were born

The author asserts that this will produce a number where the digit in the 100's place is n and the remaining digits are your age or 100*n + age. If you have had your birthday this year, your age in 2009 can be written in terms of your birth year, y, as

age = 2009 - y

So the formula should produce 100*n + (2009 - y).

It is trivial (I love saying that) to show that

50 (2n +5) + 1759 - y = 100*n + (2009 - y)

This will not work if your age is greater than 99, but as long as you are younger than that, the last two digits will always be your age even if the number of times you want to eat chocolate in a week is greater than 10 -- so in either case eat all the chocolate you want!