10 for t=1 to 1000000
20 for n=1 to t-1
30 m=t-n
40 lhs=n^int(sqrt(n)):rhs=m^(m-1)
50 if lhs=rhs then ?n,m,lhs
60 next n
70 next t
n m lhs (=rhs)
1 1 1
2 2 2
8 4 64
Overflow in 40
?t
888
OK
shows that for n+m < 888 there are only the three solutions:
(1,1)
(2,2)
(4,8)
A more sensibly written program (one that allows higher values) verifies no more solutions up to n = 48888, the point at which it was stopped:
10 for n=1 to 999999
20 v=n^int(sqrt(n))
30 v2=0:m=0
40 while v2<v
50 m=m+1:v2=m^(m-1)
60 wend
70 if v2=v then ?m,n,v
80 next
run
m n value
1 1 1
2 2 2
4 8 64
Break in 50
?n
34644
OK
cont
Break in 50
?n
48888
OK
|
Posted by Charlie
on 2011-01-12 13:09:55 |