All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Father and son (Posted on 2008-08-04)

Instead of giving a direct answer the father wrote down two positive integer numbers on a piece of paper and says:

- Sum these two numbers and evaluate the square root of the total. Doing this, youŽll get my age.

The son takes his pocket calculator and inadvertently types the two numbers, one after the other, without pressing the "+" button (e.g. if the numbers were 124 and 357, he types 124357, instead of the sum of the numbers).

After this he makes a second mistake by pressing the square root button, not once, but twice.

Finding an integer number as the result he shows it to his father:

- No, youŽre wrong, but the number you found is precisely the age of your mother, who is older than me.

How old is the father?

Note: While a solution is trivial with the aid of a spreadsheet, can you derive it without one?

 See The Solution Submitted by pcbouhid No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution (spoiler) | Comment 2 of 10 |

The following program raises possible ages of the mother to the fourth power. It then divides the resulting number into two parts, and adds the two parts. If the result is a perfect square and its square root is less than the assumed mother's age, the results are printed.

DEFDBL A-Z
CLS
FOR mother = 20 TO 120
m4 = mother * mother * mother * mother
m\$ = LTRIM\$(STR\$(m4))
FOR i = 1 TO LEN(m\$) - 1
a = VAL(LEFT\$(m\$, i)): b = VAL(MID\$(m\$, i + 1))
fsq = a + b
f = INT(SQR(fsq) + .5)
IF f * f = fsq THEN
IF f < mother AND f > 19 THEN
PRINT f; mother, LEFT\$(m\$, i); " "; MID\$(m\$, i + 1)
END IF
END IF
NEXT i
NEXT mother

The results follow:

` F   M        a    b25  50        625 000036  60       1296 000056  67       2015 112149  70       2401 000064  80       4096 000081  90       6561 0000`

where a and b are the numbers the father asked to be added.

However, in all but one instance the father would have had to specify that four zeros be used to enter the zero, which is outside the bounds of what's expected.

So the father is 56, the mother is 67 and the father asked the son to add 2015 and 1121.

 Posted by Charlie on 2008-08-04 16:33:44

 Search: Search body:
Forums (0)