If evaluating $f(n)$ is $\Theta(n)$
i = 1;
sum = 0;
while (i <= n)
do if (f(i) > k)
then sum += f(i);
i = 2*i;
Would the running time of this be $O(nlogn)$ because i is doubled after each iteration and the function is called the same number of times? Or could it even be a linear case? I am very lost on this...