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

 Another Dudeney problem (Posted on 2018-03-09)
Dudeney once asked what positive numbers have cube roots equal to the sum of their digits.
Excluding the trivial (i.e. number 1) Dudeney listed five solutions!

Find them!

Hint: the five numbers are below 25000.

 See The Solution Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 2 of 2 |
`sod  number 1   1 8   51217   491318   583226   1757627   19683`

from

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

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

For cr = 1 To 100000
cu = cr * cr * cr
If cr = sod(cu) Then
Text1.Text = Text1.Text & cr & "   " & cu & crlf
End If
DoEvents
Next

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

End Sub

Function sod(n)
s\$ = LTrim(Str(n))
tot = 0
For i = 1 To Len(s\$)
tot = tot + Val(Mid(s\$, i, 1))
Next
sod = tot
End Function

 Posted by Charlie on 2018-03-09 12:21:01

 Search: Search body:
Forums (0)