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

Home > Numbers
Thinking octal (Posted on 2018-05-30) Difficulty: 3 of 5
In "A Mathematician's Apology", G. H. Hardy wrote:
"There are just four numbers, after unity, which are the sums
of the cubes of their digits: 153,370,371,407."

Clearly, he referred to base 10.

What are such numbers in base-8?
Provide your list in octal system.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution VB program Comment 2 of 2 |
DefDbl A-Z
Dim crlf$

Private Sub Form_Load()
 Form1.Visible = True
 Text1.Text = ""
 crlf = Chr(13) + Chr(10)
 
 For a = 0 To 7
 For b = 0 To 7
 For c = 0 To 7
 For d = 0 To 7
   v = ((a * 8 + b) * 8 + c) * 8 + d
   tot = a * a * a + b * b * b + c * c * c + d * d * d
   If v = tot Then Text1.Text = Text1.Text & a & b & c & d & crlf
 Next
 Next
 Next
 Next
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

shows

0000
0001
0134
0205
0463
0660
0661

which of course includes the trivial 0 and 1.

  Posted by Charlie on 2018-05-30 10:25:17
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 (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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