The first criterion is satisfied by the following:
--primes-- N
11 19 43 8987
11 23 41 10373
11 29 37 11803
17 19 41 13243
23 29 31 20677
Of these, only the first also satisfies the second criterion.
So the only answer is N = 8987.
10 for N1=1 to 15
20 for N2=N1+1 to 15
30 for N3=N2+1 to 15
40 P1=prm(N1):P2=prm(N2):P3=prm(N3)
50 Ts=P1*P1+P2*P2+P3*P3
60 if Ts=2331 then
70 :print P1;P2;P3,P1*P2*P3
80 :Sd=1+P1+P2+P3+P1*P2+P1*P3+P2*P3+P1*P2*P3
90 :if Sd=10560 then print " ";P1;P2;P3,P1*P2*P3
200 next
210 next
220 next
BTW, within the range checked (highest prime is 47, so its square doesn't exceed 2331), the only other N to satisfy the second criterion is 8729 ( = 7 * 29 * 43). And a complete list of numbers that satisfy the second criterion is:
2 7 439 6146
2 31 109 6758
2 43 79 6794
3 5 439 6585
3 19 131 7467
3 23 109 7521
3 43 59 7611
7 11 109 8393
7 29 43 8729
11 19 43 8987
|
Posted by Charlie
on 2009-10-18 15:38:15 |