Interesting patterns in $f(k,n)=k\pi-\sum\limits_{x=1}^n\tan^{-1}\left(\frac1{\sqrt[k]x}\right)$

Motivation: If we draw a right-angled triangle $A_1$ with sides $1,1$ then the hypotenuse is of length $\sqrt2$. If we draw a right-angled triangle $A_2$ with sides $\sqrt2,1$ attached to $A_1$ then the hypotenuse is of length $\sqrt3$. If we draw a right-angled triangle $A_3$ with sides $\sqrt3,1$ attached to $A_2$ then the hypotenuse is of length $\sqrt4$. If we keep on doing this, what is the largest value of $n$ such that none of the areas of $A_1,\cdots,A_n$ overlap?


Consider the bivariate function $$f(k,n)=k\pi-\sum_{x=1}^n\tan^{-1}\left(\frac1{\sqrt[k]x}\right)$$ where $k,n$ are positive integers.

For every $k$, there is a largest value $n$ (call it $n^+$) such that $f(k,n)$ is minimised yet remaining non-negative. The results are tabulated below. \begin{align}\begin{array}{c|c|c}k&f(k,n^+)&n^+\\\hline 1& 0.0358 &16\\ 2& 0.1545 &16\\ 3& 0.1000 &20\\ 4& 0.1239 &24\\ 5& 0.1863 &28\\ 6& 0.2670 &32\\ 7& 0.3557 &36\\ 8& 0.4475 &40\\ 9& 0.5394 &44\\\\\\\\\\\\ \end{array}\quad\quad\quad\begin{array}{c|c|c}k&f(k,n^+)&n^+\\\hline 10& 0.0344 &49\\ 11& 0.1097 &53\\ 12& 0.1844 &57\\ 13& 0.2580 &61\\ 14& 0.3300 &65\\ 15& 0.4004 &69\\ 16& 0.4690 &73\\ 17& 0.5357 &77\\ 18& 0.6007 &81\\ 19& 0.6640 &85\\\\\\\\\\ \end{array}\quad\quad\quad\begin{array}{c|c|c}k&f(k,n^+)&n^+\\\hline 20& 0.0516 &90\\ 21& 0.1072 &94\\ 22& 0.1616 &98\\ 23& 0.2147 &102\\ 24& 0.2666 &106\\ 25& 0.3173 &110\\ 26& 0.3669 &114\\ 27& 0.4154 &118\\ 28& 0.4628 &122\\ 29& 0.5091 &126\\ 30& 0.5544 &130\\ 31& 0.5988 &134\\ 32& 0.6423 &138\\ 33& 0.6848 &142 \end{array}\end{align}

We can see several interesting patterns.

  1. It seems that $n^+$ increases by $4$ for each increment of $k$, but at certain values, it increases by $5$.

  2. In each table, $f(k,n^+)$ seems to be monotonically increasing.

  3. As $k$ increases, the length of the table increases (from left to right)

Each table (from left to right) represents a cycle. Therefore we have $$(n^+)_1=9,\quad (n^+)_2=10,\quad (n^+)_3=14$$ since the first cycle has length $9$, the second cycle has length $10$ and the third cycle has length $14$.

Questions

  1. Why does $n^+$ increase by $4$ so regularly in each cycle?

  2. Is it true that $f(k,n^+)$ is monotonically increasing in each cycle?

  3. Is it true that as $\ell$ increases, $(n^+)_\ell$ increases?


Answer to Motivation:

If $A=\{A_1,\cdots,A_n\}$ then $|A|=16$ since $k=2$.


Solution 1:

This is a partial answer (with a bit of rigor). I'll denote your $n^+=n^+(k)$ simply by $n_k$.

  1. A crude but easy estimate is $4k\leqslant n_k\leqslant(4k)^{k/(k-1)}$ (for $k>1$). The lower bound is trivial; on the other hand, for $0\leqslant t\leqslant 1$ we have $\tan^{-1}t \geqslant\pi t/4$ (concavity), giving the upper bound: $$0\leqslant f(k,n_k)\leqslant k\pi-n_k\tan^{-1}n_k^{-1/k}\leqslant(4k-n_k^{1-1/k})\pi/4.$$ As a consequence, we get $\color{blue}{\lim\limits_{k\to\infty}n_k/k=4}$. To refine it, write $$f(k,n)=\Big(k-\frac{n}{4}\Big)\pi+\sum_{x=1}^{n}g\Big(\frac{\ln x}{k}\Big),\quad g(t)=\frac{\pi}{4}-\tan^{-1}e^{-t};$$ we have $t-t^3/6\leqslant{}$$2g(t)$${}\leqslant t$ for $t\geqslant 0$. Together with $$\underbrace{\int_1^n\ln x\,dx}_{=n\ln n-n+1}\leqslant\sum_{x=1}^{n}\ln x\leqslant\underbrace{\int_1^{n+1}\ln x\,dx}_{=(n+1)\ln(n+1)-n},$$ we obtain \begin{gather}0\leqslant f(k,n_k)\leqslant f_k:=\Big(k-\frac{n_k}{4}\Big)\pi+\frac{(n_k+1)\ln(n_k+1)-n_k}{2k};\\0>f(k,n_k+1)\geqslant f_k-\frac{\pi}{4}-\frac{n_k+1}{12}\Big(\frac{\ln(n_k+1)}{k}\Big)^3,\end{gather} which gives $\lim\limits_{k\to\infty}f_k/\ln k=0$ and hence $$\color{blue}{\lim_{k\to\infty}\frac{n_k-4k}{\ln k}=\frac{8}{\pi}}.\label{asymplim}\tag{*}$$

  2. Using the estimates found above, \begin{align}d_k&:=f(k+1,n_k+4)-f(k,n_k)=\sum_{x=1}^{n_k+4}g\Big(\frac{\ln x}{k+1}\Big)-\sum_{x=1}^{n_k}g\Big(\frac{\ln x}{k}\Big)\\&\geqslant\frac{1}{2}\sum_{x=n_k+1}^{n_k+4}\frac{\ln x}{k+1}-\frac{1}{2}\sum_{x=1}^{n_k}\Big(\frac{\ln x}{k}-\frac{\ln x}{k+1}\Big)-\frac{1}{12}\sum_{x=1}^{n_k+4}\Big(\frac{\ln x}{k+1}\Big)^3\\&\geqslant\frac{2\ln(n_k+1)}{k+1}-\frac{(n_k+1)\ln(n_k+1)-n_k}{2k(k+1)}-\frac{n_k+4}{12}\Big(\frac{\ln(n_k+4)}{k+1}\Big)^3\\&=\frac{n_k}{2k(k+1)}-\frac{n_k-4k+1}{2k(k+1)}\ln(n_k+1)-\frac{n_k+4}{12}\Big(\frac{\ln(n_k+4)}{k+1}\Big)^3.\end{align} This implies $\liminf\limits_{k\to\infty}kd_k\geqslant 2$, hence $\color{blue}{d_k>0}$ for all sufficiently large $k$. I think one can give an explicit lower bound on $k$ for this to hold, and check the claim for smaller values of $k>2$.

  3. The limit $\eqref{asymplim}$ above shows that the sequence $k_1<k_2<k_3<\ldots$, such that $n_{k_\ell}>n_{k_\ell-1}+4$, is infinite, and suggests $\color{blue}{\lim\limits_{\ell\to\infty}k_{\ell+1}/k_\ell=e^{\pi/8}}$. The first $20$ values of $k_\ell$ seem to agree: $$\begin{array}{r|r|r}\ell&k_\ell&\approx k_\ell/k_{\ell-1}\\\hline 1&10& \\ 2&20&2.00000000 \\ 3&34&1.70000000 \\ 4&56&1.64705882 \\ 5&90&1.60714286 \\ 6&141&1.56666667 \\ 7&218&1.54609929 \\ 8&333&1.52752294 \\ 9&505&1.51651652 \\ 10&760&1.50495050\end{array}\qquad\qquad\begin{array}{r|r|r}\ell&k_\ell&\approx k_\ell/k_{\ell-1}\\\hline 11&1141&1.50131579 \\ 12&1705&1.49430324 \\ 13&2543&1.49149560 \\ 14&3785&1.48839953 \\ 15&5627&1.48665786 \\ 16&8357&1.48516083 \\ 17&12402&1.48402537 \\ 18&18395&1.48322851 \\ 19&27273&1.48263115 \\ 20&40424&1.48219851\end{array}\\e^{\pi/8}\approx 1.48097267$$