A woman, under sixty, told me, that the square of her age equals the sum of the squares of her children's ages.
How old is she , given that the children's ages form an arithmetic series of nine integers?
The woman is 48 and has children ranging from 2 to 26 in 3-year increments.
list
10 for St=1 to 20
20 for Increm=1 to 10
30 T=0
40 for Age=St to St+8*Increm step Increm
50 T=T+Age^2
60 next
70 Sr=int(sqrt(T)+0.5)
80 if Sr*Sr=T and Sr<60 then print St;Increm,Sr
85 :for Age=St to St+8*Increm step Increm:print Age;:next:print:print
90 next
100 next
OK
run
2 3 48
2 5 8 11 14 17 20 23 26
OK
... the first output line showing a youngest child as 2, with 3-year increments and the mother's age; the next line shows the ages of the children.
|
Posted by Charlie
on 2010-12-03 15:31:22 |