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

Home > Numbers
3 Cubes #2 (Posted on 2024-02-18) Difficulty: 3 of 5
The digits of 5^3, i.e. 125, can be rearranged to form 8^3, 512.

Find the smallest cube whose digits can be rearranged to form 2 other cubes.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution yet another computer solution | Comment 3 of 4 |
Here's my program:

data = Hash.new([])
(1..1_000_000).each do |i| 
  digits = (i**3).to_s.split('').sort.join('')
  data[digits]  += [i]
end
data.select { |_k,v| v.length > 2 }


It finds the same smallest cube that Larry and Charlie do. 

Interestingly, it also gives the cases with more than two rearrangements of the digits in the cube. The cube 101740954697838253 was the largest such in my test run, which is 466837^3. Its digits can be rearranged to make a total of 49 cubes, whose roots are:
[466837, 478684, 480376, 512452, 528043, 558799, 573589, 601252, 632866, 635839, 637549, 655735, 667237, 675226, 675415, 675658, 677182, 698929, 701812, 705412, 705829, 742567, 756802, 761095, 761101, 768061, 778792, 797683, 800566, 808507, 809683, 815587, 816373, 837169, 867034, 868363, 879484, 909061, 919777, 927907, 928762, 946501, 948232, 957901, 971134, 977527, 980062, 991654, 994084]


  Posted by Paul on 2024-02-19 02:55:37
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 (3)
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