For a = 2 To 2025
For b = 2 To 13
t1 = Int(a ^ b + 0.5)
If t1 > 2025 Then Exit For
For c = 2 To 13
t2 = Int(b ^ c + 0.5)
If t1 + t2 > 2025 Then Exit For
If t1 + t2 >= 1925 And t1 + t2 <= 2025 Then
Text1.Text = Text1.Text & mform(a, "###0") & mform(b, "###0") & mform(c, "###0")
Text1.Text = Text1.Text & " " & mform(t1, " ###0") & mform(t2, " ###0") & mform(t1 + t2, " ###0")
sq = a + b + c
sr = Int(Sqr(sq) + 0.5)
If sr * sr = sq Then Text1.Text = Text1.Text & Str(a) & Str(b) & Str(c) & " " & Str(a + b + c)
Text1.Text = Text1.Text & crlf
DoEvents
End If
Next
Next
Next a
finds 13 representations of these numbers
a b c a^b b^c a^b + b^c
2 10 3 1024 1000 2024
3 6 4 729 1296 2025
12 3 5 1728 243 1971
31 2 10 961 1024 1985
38 2 9 1444 512 1956 38 2 9 49
41 2 8 1681 256 1937
42 2 8 1764 256 2020
43 2 7 1849 128 1977
44 2 2 1936 4 1940
44 2 3 1936 8 1944 44 2 3 49
44 2 4 1936 16 1952
44 2 5 1936 32 1968
44 2 6 1936 64 2000
Of these, two formulations have a+b+c equal to a perfect square; these are marked with a repetition of a, b and c to the right, together with the total, which is in each case 49.
|
Posted by Charlie
on 2014-12-16 15:22:16 |