Disclaimer: This is not a homework problem. I stumbled on this puzzle on internet and I also have the answer. However I am not able to figure out whats the method to be used to arrive at the answer.


The puzzle is as below:


The product of the ages of David's children is the square of the sum of their ages. David has less than eight children. None of his children have the same age. None of his children is more than 14 years old. All of his children is at least two years old. How many children does David have, and what are their ages?


The answer happens to be 2,4,6,12. 


Please suggest ways to solve this problem systematically. 



How to tackle this puzzle?
Well, we know that the sum is at most $14+13+12+11+10+9+8+7=84$, so the product is at most $7056$.


If there are $7$ or more children, then the product is at least $8!>7056$, so there are at most $6$ children.


Furthermore, if there are $6$ children, the sum is at most $84-8-7=69$, so the product is at most $69^2=4761$, but the product is at least $7!=5040$, so there cannot be $6$ children.


Let $S$ denote the sum and $P$ the product. By the AM-GM inequality, we have $\frac{S}{n} \ge \sqrt[n]{P} = \sqrt[n]{S^2}$, so $\frac{S^n}{n^n} \ge S^2$, or $S^{n-2} \ge n^n$, where $n$ is the number of children. This means that $n \ge 3$, since $n^n \ge 1$, which would contradict $n=2$.


I'm not sure there's much else you can do without getting into some messy casework. To rule out $3$ and $5$, you can divide into cases like "Suppose at least two children are older than 11," etc, and use similar arguments regarding sums and products as above. To then find the result given that $n=4$, you'll need to use some divisibility arguments and, yes, a little bit of casework.


