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

Home > Numbers > Sequences
Arithmetic Numbers Enumeration (Posted on 2014-12-19) Difficulty: 3 of 5
Consider five positive integers A < B < C < D < E in arithmetic sequence, and find all possible solutions of:
A4 + B4 + C4 + D4 = E4 - 143

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2

DefDbl A-Z
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 2014-12-19 15:29:55
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information