Just using the finite first 20 and first 16 sequences:
The first terms and the last terms of each of these finite sequences (20 members and 16 members) are equal. That would be impossible if both were positive. So A is negative.
The program tests the possibilities:
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For a = -1 To -1000 Step -1
For d1 = 1 To 2000
fin = a + 19 * d1
tot = 20 * (a + fin) / 2
d2 = (fin - a) / 15
If d2 = Int(d2) Then
If tot = 16 * (a + fin) / 2 Then
Text1.Text = Text1.Text & a & Str(fin) & " " & d1 & Str(d2) & crlf
End If
End If
Next
Next a
Text1.Text = Text1.Text & crlf & " done"
End Sub
The two totals are of course equal at zero, and the minimum absolute value of A is 285, when the sequences go from -285 to 285 with differences of 30 and 38 respectively.
-285 285 30 38
-570 570 60 76
-855 855 90 114
On hindsight of course, 285 if the LCM of 19 and 15, the number of differences between members of the sequences.
|
Posted by Charlie
on 2016-05-04 13:13:53 |