A birthday puzzle

Today is my birthday.

Being a mathematician, I note that if I add my old age from yesterday to my new age today, I get my age today with the digits reversed!

How old am I?

This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to A birthday puzzle

  1. David says:

    (11..50).each do |i|
    if (i+i-1).to_s.reverse == i.to_s
    puts i

  2. DanR says:

    Happy Birthday!

    I figured out the answer, but for the sake of other who want to take a stab at it I will leave the answer out. I was interested if there were other sequences that followed this same pattern. It seems that there is one solution for each increasing power of 10 (1 solution for 2 digit number, 1 solution for 3 digit numbers, etc), and they follow a very distinct pattern. Yes, I may have written a little computer program to test this. And yes, I may have done this at work. 🙂

    Additionally, I wasn’t able to find any triplets or quadruplets that worked in the same manner. Does it only work for couples? Is that provable?

    Thanks for the little puzzle, and once again, Happy Birthday!

  3. Travis says:

    @David — My age is SEG_FAULT? Oh, wait… I think I forgot a semicolon…

    @DanR — I don’t know the answers to these questions… but I DO know what my next undergraduate research problem will be. Thanks, Dan!

  4. Dave H says:

    I got it, albeit good ol brute force method. This is why I only have a math minor.

Leave a Reply

Your email address will not be published. Required fields are marked *

fifty seven − = forty eight