For what maximum positive $k$ is $2n \sin^{2} \frac{\pi}{n} > \tan \frac{k\pi}{n}$ true? I am trying to find the maximum value of  $k$ such that the inequality $$2n \sin^{2} \frac{\pi}{n} > \tan \frac{k\pi}{n}$$ is satisfied. I impose restrictions that $n \in \mathbb{Z}$ with $n \geq 5$, and $k \in \mathbb{Z}$ with $k \leq \lfloor \frac{n}{2}\rfloor$. If $n$ is very large, I can expand the inequality in Taylor series to obtain that $2\pi >k$, so $k \leq 6$. 
How could I find the greatest upper bound for $k$ for small and intermediate $n$? I suspect that I still have $k \leq 6$ but cannot prove or disprove it. I should add that I only need an upper bound for $k$ rather than an exact value.
Thanks...

Let
$$
f(x)=\frac{x}{\pi}\,\arctan\Bigl(2\,x\sin^2\frac{\pi}{x}\Bigr),\quad x>0.
$$
Then $k=\lfloor\, f(n)\rfloor$.
Using that $\arctan x<x$ and $\sin x<x$ if $x>0$, we see that
$$
f(x)<\frac{x}{\pi}\,\arctan\Bigl(\frac{2\,\pi^2}{x}\Bigr)<2\,\pi<7.
$$
Moreover, $\lim_{x\to\infty}f(x)=2\,\pi$. Thus $k\le6$ for all $n$ and $k=n$ for all $n$ large enough. It can be shown that $f$ is increasing, and direct calculation shows that $k=6$ for all $n\ge53$.
