The almost cube root of an integer x, is the largest possible integer r, such that
and
. For example
, then
, since
and since the next larger divisor of
which is 6, does not qualify because
. Obviously, if x is a perfect cube, then
.
Given an integer n, please find sum of the "almost cube roots" of all integers from 1 to
For
, the program ouput should be
:
where:
is the almost cube root of i.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
-
1777 Solvers
-
Count from 0 to N^M in base N.
240 Solvers
-
284 Solvers
-
305 Solvers
-
20 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I am getting s=3771 for n=1000 and ss=[36, 578069405385, 493, 21113, 50479263911] for test 10.
Hi Tim,
You are correct. Please try again and please like and rate the problem. Thanks.
I have a drop dead simple solution (size=33) that runs on time if the max exponent of test case 10 were 8.6, but I can't figure out how to make it any faster, even with more complexity. Based on the motif of ES VII, I suspect prime numbers hold the key, but I don't see how.