The three numbers are
4 5 7
Their factorials, factorials incremented by 1 and the square roots of the latter are:
24 25 5.0 120 121 11.0 5040 5041 71.0
The total of the factorials is 24 + 120 + 5040 = 5184, which is the square of 72.
10 for T=6 to 1000
20 for A=1 to int(T/3)
23 Sq1=!(A)+1:Sr=int(sqrt(Sq1))
24 if Sr*Sr=Sq1 then
30 :for B=A+1 to int((T-A)/2)
32 :Sq2=!(B)+1:Sr=int(sqrt(Sq2))
34 :if Sr*Sr=Sq2 then
40 :C=T-A-B
50 :Sq3=!(C)+1:Sr=int(sqrt(Sq3))
60 :if Sr*Sr=Sq3 then
70 :Sq4=!(A)+!(B)+!(C):Sr=int(sqrt(Sq4))
80 :if Sr*Sr=Sq4 then print A;B;C
82 :print !(A);!(A)+1;sqrt(!(A)+1),
83 :print !(B);!(B)+1;sqrt(!(B)+1),
84 :print !(C);!(C)+1;sqrt(!(C)+1)
85 :print !(A)+!(B)+!(C);sqrt(!(A)+!(B)+!(C))
89 :endif
90 :endif
100 :endif
110 :next
120 next
130 next
|