15
$\begingroup$

I went to my friend's birthday party yesterday. It was a wonderful occasion, but something about it puzzled me.

I was in the kitchen with him while he was preparing his cake. He pulled a small number of candles out of the drawer, each one distinct from the others, and started lighting them - they'd clearly all been lit and extinguished several times before.

"Oh!" I said, "That's nowhere near as many candles as I was expecting. Usually the number of candles on someone's cake represents their age!"

"They do for me too," he said in reply. "In fact, this year is a bit of a special occasion - today I'll be lighting all of my candles. On most of my birthdays, I leave at least one unlit."

Before I could interject to ask him why, he went on: "Not only that, but next year will be special too. Next year I'll be buying an entirely new candle, and that'll be the only one I light."

"Don't you normally add more candles to your cake as you get older?"

"Sure, I used to do it quite regularly, but I don't need to buy new candles very often any more. After next year's candle, I'll have enough to last quite a while. The candle I buy after after that will probably give me enough to last the rest of my life"

How old is my friend?

$\endgroup$
3
  • $\begingroup$ This seems like essentially the same thing as this question - the only difference is that it doesn't give the actual number of candles. $\endgroup$
    – Deusovi
    Commented Feb 20, 2023 at 14:42
  • $\begingroup$ @Deusovi Cripes, you're right! It is basically the same puzzle - searching for candles and birthday didn't find it when I went duplicate-hunting. Not only is it the same puzzle, but I'd actually already upvoted it. I must have found it 6 years ago, forgotten about it entirely, and then had it come back to me out of nowhere last weekend. What's the procedure from here? $\endgroup$
    – ymbirtt
    Commented Feb 20, 2023 at 14:54
  • 1
    $\begingroup$ It's fine, it happens! I've gone ahead and marked it as a duplicate. $\endgroup$
    – Deusovi
    Commented Feb 20, 2023 at 15:00

1 Answer 1

19
$\begingroup$

The answer is

31

The key to solving:

The candle has two states, off and lit, and the description “This year I'll be lighting all of my candles, and next year I'll light only that new candle.” These together brings to mind the properties of binary: When all the bits of the number X are 1, the number X + 1 will have only the highest digit being a 1 and all the lower bits being 0.

So,

This friend is using binary numbers to indicate his age. When the candle is lit, it means 1, otherwise it means 0.

This year he is 31 years old, he will light all 5 candles, 11111 to represent 31 in binary. Next year he will buy another candle and light it only, the cake will be placed with 100000 (32 in binary). When he buys the 7th candle years later, that will last him until he is 127 years old (1111111), which is likely to be a lifetime.

$\endgroup$
2
  • $\begingroup$ somehow obvious for anyone used to working with binary notation. It was my immediate thought as well, though the last sentence threw me off as it could be read as he'd like ONLY that candle for a long time. $\endgroup$
    – Tom
    Commented Feb 20, 2023 at 13:42
  • $\begingroup$ @Tom, good point! I'll go re-word that $\endgroup$
    – ymbirtt
    Commented Feb 20, 2023 at 14:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.