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

Home > Numbers
Another Dudeney problem (Posted on 2018-03-09) Difficulty: 3 of 5
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.)
Solution computer solution Comment 2 of 2 |
sod  number
 1   1
 8   512
17   4913
18   5832
26   17576
27   19683

from

DefDbl A-Z
Dim crlf$

Private Sub Form_Load()
 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
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 (24)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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