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

 All possible integer determination (Posted on 2015-06-20)
Find all possible integers P, Q, R and S with 1 ≤ P ≤ Q ≤ R ≤ S satisfying this equation:
PQ+RS = P+Q+R+S+3

 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 1 of 1
`p q r s    lhs & rhs1 1 2 6     132 2 3 3     131 2 2 6     142 2 2 5     14`

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

For tot = 3 To 1000
For p = 1 To tot / 4
For q = p To (tot - p) / 3
For r = q To (tot - p - q) / 2
s = tot - p - q - r
If p * q + r * s = p + q + r + s + 3 Then
Text1.Text = Text1.Text & p & Str(q) & Str(r) & Str(s) & "     " & p * q + r * s & crlf
DoEvents
End If
Next
Next
Next

Next

Text1.Text = Text1.Text & crlf & " done"

End Sub

 Posted by Charlie on 2015-06-20 14:44:33

 Search: Search body:
Forums (0)