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 Solvers5
Suggested Problems
-
Remove all the words that end with "ain"
2648 Solvers
-
502 Solvers
-
Determine if a Given Number is a Triangle Number
398 Solvers
-
Project Euler: Problem 5, Smallest multiple
1651 Solvers
-
Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
49 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.