I was thinking about the alternating harmonic series: $1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots$.
I wondered what would happen if we tweak the numerators so that the partial sums alternate between "barely" non-negative and "barely" non-positive.
That is, $\frac{u_1}{1}-\frac{u_2}{2}+\frac{u_3}{3}-\frac{u_4}{4}+\cdots$ where
$u_1=1$
$u_2=\left\{\text{least positive integer $m$ such that $1-\frac{m}{2}\le0$} \right\} =2$
$u_3=\left\{\text{least positive integer $m$ such that $1-\frac{2}{2}+\frac{m}{3}\ge0$} \right\} =1$
$u_4=\left\{\text{least positive integer $m$ such that $1-\frac{2}{2}+\frac{1}{3}-\frac{m}{4}\le0$} \right\} =2$
$u_5=\left\{\text{least positive integer $m$ such that $1-\frac{2}{2}+\frac{1}{3}-\frac{2}{4}+\frac{m}{5}\ge0$} \right\} =1$
$u_6=\left\{\text{least positive integer $m$ such that $1-\frac{2}{2}+\frac{1}{3}-\frac{2}{4}+\frac{1}{5}-\frac{m}{6}\le0$} \right\} =1$
And so on.
In other words, for $n>1$: $u_n=\left\{\text{least positive integer $m$ such that $(-1)^{n-1}\sum\limits_{k=1}^{n-1}(-1)^{k-1}\frac{u_k}{k}+\frac{m}{n}\ge 0$}\right\}$
Here is a plot of $u_n$ against $n$ for $1\le n \le 100$.
Is there a way to determine the values of $u_n$ for large values of $n$, without calculating them one by one?
Observations
The sequence $u_n$ has a striking resemblance to A026465, which I shall refer to as $w_n$: the length of the $n$th run of identical symbols in the Thue-Morse sequence.
$u_n$ (starting with $u_{51}$), and $w_n$, are both comprised of two building blocks:
$A:$ 2 1 1 2 2 2 1 1 2 1
$B:$ 1 2 1 1 2 2 2 1 1 2 X , where X could be 1 or 2.
$A$ is always followed by $B$.
If X=1 then X is followed by $B$. If X=2 then X is followed by $A$.
(I am unable to explain these phenomena.)