I have been given a series: $$\lfloor(N/2^2)\rfloor*2^2+\lfloor(N/3^2)\rfloor*3^2+\lfloor(N/4^2)\rfloor*4^2+....+\lfloor(N/\lfloor\sqrt(N)\rfloor^2)\rfloor*\lfloor\sqrt(N)\rfloor^2$$ Where N is a natural number. I know it can be solved in $O({\sqrt N})$ time complexity, but can there be any other way to solve this.
Asked
Active
Viewed 51 times
1
spectre009
- 19
-
Here's a MathJax tutorial :) – Shaun Apr 11 '20 at 20:05
-
See http://oeis.org/A309125 – Arthur Apr 11 '20 at 20:10
-
This question has been asked numerous times recently. I'm guessing it's a competition problem. – Calvin Lin Apr 11 '20 at 20:33