Consider five positive integers A < B < C < D < E in arithmetic sequence, and find all possible solutions of:
A^{4} + B^{4} + C^{4} + D^{4} = E^{4}  143
DefDbl AZ
Dim crlf$
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$)  Len(a$)) & a$
mform$ = a$
End Function
Private Sub Form_Load()
ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
For a = 1 To 10000
For diff = 1 To 10000
d = a + 3 * diff
d4 = d * d * d * d
If d4 > 1E+15 Then Exit For
b = a + diff: c = b + diff
tot = a * a * a * a + b * b * b * b + c * c * c * c + d4
totPlus = tot + 143
rt = Int(Sqr(Sqr(totPlus)) + 0.5)
If rt * rt * rt * rt = totPlus Then
Text1.Text = Text1.Text & a & Str(diff) & crlf
DoEvents
End If
Next
Next a
Text1.Text = Text1.Text & " done"
End Sub
Finds only A = 3 and the successive differences are 1:
3^4 + 4^4 + 5^4 + 6^4 = 7^4  143
The program negelected to check that E was part of the arithmetic sequence, but the only sequence found for A through D did indeed result in an E that was part of the sequence.

Posted by Charlie
on 20141219 15:29:55 