Preparation
Solving this problem means that you must be able to survey
the possible solutions easily. Mathematically it means that all the factorizations
of 2450 must be computed as well as the sum of the factors. This can of
course be done by hand but it is also a nice programming task to achieve
it. I first did one in BASIC but changed it to MATLAB that is more versatile
and independent of computer platform. Here it is:
MatLab program for factorization
function nr = age(n)
a=1;
nr=[0 0 0 0];
while a*a*a<n
b=a;
while a*b*b <= n
if rem(n,(a*b)) == 0
age = [a b n/(a*b) (a+b+n/(a*b))];
nr=[nr' age'];
nr=nr';
end
b=b+1;
end
a=a+1;
end
Resulting table --- nr(2450)
Youngest |
Medium |
Oldest |
Sum |
1
|
1
|
2450
|
2452
|
1
|
2
|
1225
|
1228
|
1
|
5
|
490
|
496
|
1
|
7
|
350
|
358
|
1
|
10
|
245
|
256
|
1
|
14
|
175
|
190
|
1
|
25
|
98
|
124
|
1
|
35
|
70
|
106
|
1
|
49
|
50
|
100
|
2
|
5
|
245
|
252
|
2
|
7
|
175
|
184
|
2
|
25
|
49
|
76
|
2
|
35
|
35
|
72
|
5
|
5
|
98
|
108
|
5
|
7
|
70
|
82
|
5
|
10
|
49
|
64
|
5
|
14
|
35
|
54
|
7
|
7
|
50
|
64
|
7
|
10
|
35
|
52
|
7
|
14
|
25
|
46
|
Now the tedious work is done! A little thinking remains!
When you have done that it is time to conclude like the brother did.
Ingvar Jönsson