All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 First Term Finding (Posted on 2016-05-04)
Consider two arithmetic sequences having the common first term as A, where A is an integer. All the terms of the two sequences are integers.

Determine the minimum absolute value of A such that:

The 20th term of the first sequence equals the 16th term of the second sequence, and:

The sum of the first 20 terms of the first sequence equals the sum of the first 16 terms of the second sequence.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 2 of 2 |
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\$

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

 Search: Search body:
Forums (0)