 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  Cubic and Factorial Puzzle (Posted on 2015-06-23) Find all triplets (X,Y,Z) of positive integers such that:
X3+ Y3+ Z3 = X! + Y! + Z! +11

 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
(1, 2, 5) and its permutations

from

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

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

mn = 9999999999#
For tot = 3 To 150
For a = 1 To tot / 3
a3 = a * a * a
af = fact(a)
For b = a To (tot - a) / 2
b3 = b * b * b
bf = fact(b)
c = tot - a - b
c3 = c * c * c
cf = fact(c)
diff = (a3 + b3 + c3) - (af + bf + cf)

If Abs(diff) = 11 Then
Text1.Text = Text1.Text & diff & "    " & a & Str(b) & Str(c) & crlf
End If
Next
Next
Next

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

End Sub

Function fact(x)
f = 1
For i = 2 To x
f = f * i
Next
fact = f
End Function

 Posted by Charlie on 2015-06-23 11:39:47 Please log in:

 Search: Search body:
Forums (4)