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

Home > Numbers
Cube Arranger (Posted on 2024-03-22) Difficulty: 3 of 5
Find the smallest distinct positive integers, M and N such that you can rearrange the digits of M to get N, and you can rearrange the digits of M3 to get N3. [Leading zeroes are not allowed.]

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 computer solution Comment 3 of 3 |
The smallest M and N are   101  and  110 from the table below.

               cubes                             roots
 
       1030301           1331000              101     110
       1061208           8120601              102     201
    1003003001        1030301000             1001    1010
    1006012008        1061208000             1002    1020
    1009027027        1092727000             1003    1030
    1012048064        1124864000             1004    1040
    1030301000        1331000000             1010    1100
    1033364331        1334633301             1011    1101
    1061208000        8012006001             1020    2001
    8012006001        8120601000             2001    2010
    8024024008        8242408000             2002    2020
    8036054027        8365427000             2003    2030
    8048096064        8489664000             2004    2040
    8060150125        8615125000             2005    2050
   14706125000       15700120064             2450    2504
   18274576104       18462541707             2634    2643
   27027009001       27270901000             3001    3010
   27054036008       27543608000             3002    3020
   27081081027       27818127000             3003    3030
   27108144064       64144108027             3004    4003
   33698267000       36002379608             3230    3302
   40814179307       81407931704             3443    4334
   40885346125       82540153864             3445    4354
   64048012001       64481201000             4001    4010
   64096048008       64964808000             4002    4020
  124625374875      215352647784             4995    5994
  125075015001      125751501000             5001    5010
  125450540216      216540450125             5006    6005
  125525735343      343735525125             5007    7005
  125600960512      512960600125             5008    8005
  190705121216      191601072125             5756    5765
  235342236024      302652322344             6174    6714
  342706083992      990430687232             6998    9968
  542140836264      623054684421             8154    8541
  939752134875      992518734375             9795    9975


The table is from

clearvars,clc
cubes=[]; cubestr=string.empty(0,1);
for i=1:9999
  cubes(end+1)=i^3;
  cubestr(end+1)=string(i^3);
end
for i=1:length(cubestr)
  c=sort(char(cubestr(i)));
  cubestr(i)=string(c);
end
[cubestr idx]=sort(cubestr);
cubes=cubes(idx);

rootpairs=double.empty(0,4);
for i=2:length(cubestr)
  if cubestr(i)==cubestr(i-1)
    cr1=sort(num2str(cubes(i-1)^(1/3)));
    cr2=sort(num2str(cubes(i)^(1/3)));
    if cr1==cr2
      % disp([cubes(i-1) cubes(i) round(cubes(i-1)^(1/3)) round(cubes(i)^(1/3))])
      rootpairs(end+1,:)=[cubes(i-1) cubes(i)  round(cubes(i-1)^(1/3)) round(cubes(i)^(1/3))];
    end
  end
end
rootpairs=sortrows(rootpairs);
disp(' ')
disp(rootpairs)


  Posted by Charlie on 2024-03-22 10:00:23
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 (9)
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