I'd ordered her a cake, but when I got to the bakery to pick it up, the cake decorator had transposed the digits of her age.

"She'll thank you for the compliment," I said, "but her age is a prime number, and the number on the cake is the product of the digits of her age at not one, but two future birthdays."

"You don't think she'll break any longevity records, then?" the cake decorator shouted after me as I was leaving the shop without my cake.

How old is my sister?

  • 6
    $\begingroup$ You have to wonder at the way the cake baker's mind works, that they can instantly figure that out, and yet still screw up the cake $\endgroup$
    – Strawberry
    Commented Mar 9, 2020 at 13:55
  • 1
    $\begingroup$ In case anyone else runs into the same misreading that I did: "the product of the digits of her age at not one, but two future birthdays" means that for future birthdays ab and cd, ab = age and cd = age. Not that a * b * c * d = age. $\endgroup$ Commented Mar 10, 2020 at 20:04

2 Answers 2



Your sister is


and the age on the cake is

35, equal to the digit product of both 57 and 75 (assuming she won't reach 157).

Proof of uniqueness

We're given several pieces of information:

  • "transposed the digits of her age" - her age is 2 digits.
  • "She'll thank you for the compliment" - the age on the cake makes her seem younger, so the second digit is smaller than the first.
  • "her age is a prime number" - her age is a 2-digit prime (only 20 of those!).

Taking these pieces of information into account, we've already narrowed it down to a small set of possibilities:

41, 43, 53, 61, 83.

The reversed numbers are:

14=2*7, 34=2*17, 35=5*7, 16=4*4=2*8, 38=2*19.

We can immediately rule out

43 and 83 because 17 and 19 are not digits, and 41 and 61 because only 72 and 82 (respectively) are larger with the right digit product.

That leaves only one possible answer.

  • 1
    $\begingroup$ Almost. She wouldn't have to break the longevity record by much to allow other solutions. $\endgroup$ Commented Mar 8, 2020 at 22:02
  • 1
    $\begingroup$ @Rupert Yeah, living to 127 would be enough to allow a second solution, I think? $\endgroup$ Commented Mar 8, 2020 at 22:04
  • $\begingroup$ Living to 127 (5 years past Jeanne Calment) makes 41 a possible answer and to 128 allows 61. $\endgroup$ Commented Mar 9, 2020 at 3:19
  • $\begingroup$ How did you know that it must be two digits from "transposed the digits of her age" ? $\endgroup$
    – minseong
    Commented Mar 9, 2020 at 12:01
  • 1
    $\begingroup$ @theonlygusti - her current age is a prime number,meaning it cant end in a zero - which would be the only way to make the transposed age a single digit number $\endgroup$
    – eagle275
    Commented Mar 9, 2020 at 12:32

She was


The decorator put

35 which is the product of digits for 57 and 75. If she set a longevity record and reached 157, it would be that, too.

  • 1
    $\begingroup$ Just a few minutes in it :-) Have a +1. $\endgroup$ Commented Mar 8, 2020 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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