A question¹ that has been around for some time was recently closed as duplicate² by moderator overrule.
I don't agree with this closure for three reasons:
It's not a duplicate of the question provided²: it asks for the analysis of a nested loop, not about particularities of Landau notation. The OP does end up making the "sum of Landau terms"-mistake -- but incidentally.
Leaving duplicate aside, this is not a dump question since the OP does provide an attempt. The reasoning is succinct enough so that the question "Is my reasoning correct?" is a focussed enough question.
Given the elaborate and well-written answers, this is a question I'd like to use as target for duplicate closures of other "nested loop runtime" questions.
Since we did not find consens among the moderators (the majority being biased by having provided answers to the question¹) and multiple users have voted to "Leave Closed", I'm posing this question here.
- Should the question remain closed? Why?
- If so, should we change the linked duplicate?
- What is the asymptotic runtime of this nested loop?
Full disclosure: After the question was closed, I edited it in order to emphasise the points that make it distinct from the question chosen (which is how I understood it originally). - What goes wrong with sums of Landau terms?