The program doesn't list all the possibilities when x or y equals -1 as that would go on forever, but
10 For tot = 0 To 10000
20 For x0 = 0 To int((tot - 1) / 2)
30 y0 = tot - x0
40 x = -x0: y = -y0: GoSub *tryIt
50 x = -x0: y = y0: GoSub *tryIt
60 x = x0: y = -y0: GoSub *tryIt
70 x = x0: y = y0: GoSub *tryIt
90 Next
100 Next
110
120 print "done"
130
140 end
150
160 *tryIt:
170 z2 = (x ^ 3 - 1) * (y ^ 3 - 1)
180 If z2 > 0 Then
190 :z = Int(Sqr(z2) + 0.5)
200 :If z * z = z2 Then
210 :print x , Str(y) ,Str(z)
220 :End If
230 :End If
240 Return
finds
(x,y,z) =
(0,-2,3)
(2,4,21)
(-1,-23,156)
(2,22,273)
(4,22,819)
(-6,-26,1953)
3,313,28236)
(-20,-362,616077)
The program at this point has gone through values where abs(x)+abs(y)<=896.
|
Posted by Charlie
on 2018-02-27 14:38:46 |