Determine all possible pair(s)
(X, Y) of positive integers that satisfy this equation.
XXX = YY
Note: The order of calculation in
XXX is as given in
this article.
(In reply to
improved program by Charlie)
Rather than incrementing y by 1 to get to ever higher values needed for y, it's better to calculate the approximate needed y for a given x, and try the integer below and the integer above. That way, the following program goes up to x=800, needing values of y with over 2000 digits:
10 point 16
20 for X=2 to 800
30 Lhs=(X^X)*log(X)
40 Ly=100:PrevY=2:Y=2
50 loop
60 Y=abs(Lhs/log(Y))
70 if abs(Y-PrevY)<0.0000000000000000000001 then goto *FoundOne
80 PrevY=abs(Y)
90 endloop
100 *FoundOne
110 Y1=int(Y):Y2=-int(-Y)
115 if abs(Lhs-Y1*log(Y1))<0.000000001 then print X,Y,Lhs,Y1*log(Y1)
116 if abs(Lhs-Y2*log(Y2))<0.000000001 then print X,Y,Lhs,Y2*log(Y2)
200 next
It still does not find any pairs beyond (1,1).
|
Posted by Charlie
on 2009-03-18 15:50:28 |