Determine the smallest positive perfect cube whose base ten representation begins and ends with 888.
Just to make sure the front 888 do not overlap with the ending 888, the cube roots of all such numbers are:
888 9.61179106741066
8888 20.7141928538955
88888 44.6287145754376
888888 96.1499393038261
So all the answers must be larger than 888888.
Then, from these cube roots:
8880000 207.079761089681
88800000 446.139820895124
888000000 961.179106741066
8889999 207.15745680462
88899999 446.307226299642
888999999 961.539773996649
can be seen that the first three digits of the cube root will be 207, 446 or 961, depending on the length of the perfect cube.
The first part of the program below determines that there are four possible endings to the cube root: 192, 442, 692, and 942.
As a start it tries all 12 combinations of lead and trailing digits, not knowing the length of the resulting perfect cube, with no intervening digits:
endings=[];
for e=2:2:998
p=e;
for i=1:2
p=mod(p*e,1000);
if p==888
disp(e)
endings(end+1)=e;
end
end
end
beginnings=[207,446,961]
for front=beginnings
for bsub=1:length(endings)
cr=sym(front)*1000+endings(bsub);
v=cr^3;
disp([cr v])
end
end
finding
[207192, 8894446923621888]
[207442, 8926682181394888]
[207692, 8958995229917888]
[207942, 8991386162940888]
[446192, 88831160947109888] This is it!
[446442, 88980560099382888]
[446692, 89130126667405888]
[446942, 89279860744928888]
[961192, 888035735381989888]
[961442, 888728833166762888]
[961692, 889422291492285888]
[961942, 890116110452308888]
88,831,160,947,109,888 is the smallest such perfect cube, its cube root being 446192,
But hold on; what about the overlapping cases: 44692 and 96192. Well, their cubes are 89266677421888 and 890055039909888 respectively and so don't quite meet one of the criteria.
|
Posted by Charlie
on 2022-08-02 09:23:26 |