How far from home, can my robot roam? It has constant step size, and turns by increasing amounts. A robot's step size is always $1$. Between steps it turns right, by increasing amounts: $\frac{1\pi}{2},\frac{2\pi}{3},\frac{3\pi}{4},\frac{4\pi}{5},...$

What is the robot's maximum distance from the origin?

Here are the first 15 steps, starting in the lower-left corner (switching color every three steps, for clarity).

Superimpose cartesian coordinates, with the first step from $(0,0)$ to $(0,1)$. After the $n$th step, the robot's coordinates are:
$$x=\sum_{k=1}^n \sin{\left(\sum_{i=1}^k \pi\left(1-\frac{1}{i}\right)\right)}$$
$$y=\sum_{k=1}^n \cos{\left(\sum_{i=1}^k \pi\left(1-\frac{1}{i}\right)\right)}$$
Its distance from the origin is
$$d(n)=\sqrt{x^2+y^2}$$
Here is the graph of $d(n)$ against $n$.

It looks like the maximum value of $d(n)$ is $d(2)=\sqrt{2}$, which corresponds to the red point in the first diagram. But we cannot check the entire graph, because it goes forever. How can we know the maximum value of $d(n)$?
EDIT
It would be enough to prove the following:

Lemma: The circle through three consecutive vertices of the robot's path, encloses all subsequent vertices.

The circle through the first three vertices $(0,0),(0,1),(1,1)$ is $(x-\frac12)^2+(y-\frac12)^2=\frac12$. All points on this circle are within $\sqrt{2}$ from the origin. So we would know that $\sqrt{2}$ is the maximum distance form the origin. But I don't know how to prove the lemma.
EDIT2
@Intelligentipauca's comment pointed out that the lemma is false. For example, the circle through the points for $n=2,3,4$ does not enclose the point for $n=6$.
 A: Identify Euclidean plane $\mathbb{R}^2$ with complex plane $\mathbb{C}$.
For each $k \in \mathbb{Z}_{+}$, let
$u_k = i(-1)^k e^{i \pi H_k}$ where $H_k = \sum\limits_{\ell=1}^k \frac{1}{\ell}$ are the Harmonic numbers.
In terms of $u_k$, the position after $n^{th}$ move, $(x_n,y_n)$, is given by the formula:
$$a_n \stackrel{def}{=} x_{n} + iy_{n}= \sum_{k=1}^n u_k$$
Let $b_n$ and $c_n$ be the averages and averages of averages of successive locations of $a_n$. ie.
$$b_n = \frac12(a_{n+1} + a_n)\quad\text{ and }\quad c_n = \frac12(b_{n+1} + b_n)$$
Let $K = \frac{\pi\sqrt{\pi^2+4}}{4}$, notice
$$\begin{align}
|a_n - b_n| 
&= \frac12|u_{n+1}| = \frac12\\
|b_n - c_n |
&= \frac14|u_{n+2} + u_{n+1}| = \frac14\left| e^{i\frac{\pi}{n+2}} - 1\right|\\
&= \frac12\sin\frac{\pi}{2(n+2)} < \frac{\pi}{4(n+2)}\\
|c_{n+1} - c_n| 
&= \frac14|u_{n+3} + 2u_{n+2} + u_{n+1}|
= \frac14\left|e^{i\frac{\pi}{n+3}} - 2 + e^{-i\frac{\pi}{n+1}}\right|\\
&\stackrel{\color{blue}{[1]}}{\le} 
\frac14\sqrt{\left(\frac{\pi^2}{(n+1)(n+3)}\right)^2 + \left(\frac{\pi}{n+1} - \frac{\pi}{n+3}\right)^2}\\
&< \frac{K}{(n+1)(n+2)}
\end{align}
$$
So for all $m \ge n$, we have
$$\begin{align}|a_m - c_n| 
&\le |a_m - b_m| + |b_m - c_m| + \sum_{k=n}^{m-1}|c_{k+1}-c_k|\\
&\le \frac12 + \frac{\pi}{4(m+2)} + \sum_{k=n}^{m-1}\frac{K}{(k+1)(k+2)}\\
&< \frac12 + \frac{K}{n+1}
\end{align}
$$
which in turn implies
$$|a_m| < |c_n| + \frac12 + \frac{K}{n+1}$$
For $n = 55$, the expression on RHS $\sim
1.399210680593634 < \sqrt{2} = |a_{2}|$. This means for all $m \ge 55$, $a_m$ is closer to origin than $a_2$.
By brute force, one can verify $|a_1|, |a_3|,\ldots |a_{54}|$ are all smaller than $\sqrt{2}$. This means $\sqrt{2}$ is indeed the maximum distance from origin.

Notes

*

*$\color{blue}{[1]}$ - For any $\frac{\pi}{2} \ge u > v> 0$, let $u = p + q$ and $v = p-q$, we have
$$\begin{align}|e^{iv} - 2 + e^{-iu}|
&= |e^{ip} - 2e^{iq} + e^{-ip}|\\
&= 2\sqrt{(\cos(p) - \cos(q))^2 + \sin(q)^2}\\
&= \sqrt{\left(4\sin\frac{u}{2}\sin\frac{v}{2}\right)^2 + (2\sin(q))^2}\\
&\le \sqrt{(uv)^2 + (2q)^2}\\
&= \sqrt{(uv)^2 + (u-v)^2}
\end{align}
$$
