A puzzle by Princeton mathematician John Horton Conway:
Last night I sat behind two wizards on a bus, and overheard the following:
A: I have a positive integral number of children, whose ages are positive integers, the sum of which is the number of this bus, while the product is my own age.
B: How interesting! Perhaps if you told me your age and the number of your children, I could work out their individual ages?
B: Aha! AT LAST I know how old you are!
Rem: Taking in account the fatherhood limitations, this is uniquely solvable.
(In reply to computer aided solution
Nicely done, Charlie!
Based on reading the problem, I guessed that the age was either 36 or 48, and 3 or 4 or 5 children (most likely 4), but I did not have time yet to work out a solution.
By the way, you could have limited your program to a number of children from 3 to 9, as it can never be two. If there are only 2 children, their ages can always be worked out when their product and sum is known.