I have this function
$$f(x)=\sum_{k=1}^{\lfloor x\rfloor}\tan(k),\quad x\ge 1$$
Then I tried to plot several graphs with this code
f[x_]:=Sum[Tan[k],{k,1,Floor[x]}]
Table[Plot[f[x],{x,1,10^n}],{n,2,10}]
but after half hour or so the computer hang on (memory issues) and I restarted it. Clearly the code is not the more efficient for this task.
My question is: can you give me some tips to improve the performance of mathematica to draw this function? By example, it is possible to define a recursion, instead of a function, and draw it? It seems more appropriate to use a recursion instead of a sum to draw this function.