Problem of the Week 1170

Happy Birthdays

Solution

Problem 1170 was solved by Richard Yanco and Joseph DeVincentis. Here is DeVincentis's solution.

There are two cases of happy birthday years to consider.

For years within the century of birth, if the year is AB and the age is BA, then birth year must be (A − B)(B − A), and since A must be greater than B, the ones digit is negative and carries, but it still comes out to 9(A − B). So the last two digits of the birth year must be a multiple of 9. If the birth year is 9*X, you'll get a happy year each time A − B = X. Your first one will occur at the next decade year (90, if born in 81; 80, if born in 72, etc.) and then you'll get one every 11th year. This means that if you are born in year 9*X (X from 0 to 10), you will get 10 − X happy birthdays.

For years in the following century, the year is 1AB and the age is BA, so the birth year becomes 100 − 9(A − B), and so must be one more than a multiple of 9. In this case, you'll get your first happy year in the decade anniversary of your birth which first occurs in the new century (09 if you were born in 19, 08 if born in 28, etc.; if born in 10 or 01, you don't get any), and continue to get them every 11 years. If you were born in year 9*X + 10 (X from 0 to 9), you will get X happy birthdays.

If you were born in any other year, you don't get happy birthdays.

For the maximum number of happy birthdays, you want to be born in 00. Then you get 10 of them — at 00, 11, ..., 99.

[Back to Problem 1170]

© Copyright 2013 Stan Wagon. Reproduced with permission.


11 November 2013