Is the sequence $(B_n)_{n \in \Bbb{N}}$ unbounded, where $B_n := \sum_{k=1}^n\mathrm{sgn}(\sin(k))$? This question is kind of an extension of a previous question I asked here.
The infinite series
$$\sum\frac{\mathrm{sgn}(\sin(n))}{n}$$
does converge, but I would like to know if Dirichlet's test can be used to prove the convergence with
$$b_n=\mathrm{sgn}(\sin(n)).$$
So the question is, is the sequence $(B_n)$ given by
$$B_n:=\sum_{k=1}^n\mathrm{sgn}(\sin(k))$$
unbounded? Loosely speaking it is a sum of $1$'s and the sign changes every $\pi$ terms. Also it would be great to know if the sequence $(B_n)$ is unbounded for other (irrational) changing cycles.
 A: This sequence is unbounded and this result extends to every irrational period, though I only write out explicitly the case asked.
Define $f(x)=\operatorname{sgn}(\sin(x))$. Let us also define $$g_n(x)=f(x)+f(x+1)+f(x+2)+\ldots+f(x+n-1).$$ The question is whether the sequence $g_0(0), g_1(0), g_2(0), \ldots$ is unbounded.
Lemma: The sequence $g_0(0), g_1(0), g_2(0), \ldots$ is bounded if and only if the sequence of functions $g_0, g_1, g_2, \ldots$ is uniformly bounded.
Proof: Observe that since $g_n(x)$ is a sum of functions which are continuous except for some jump discontinuities and no two jump discontinuities in the summands align, it is also continuous aside from sum jump discontinuities - formally, we may say that for any $x$, there exists some $\varepsilon$ such that if $|x'-x| <\varepsilon$ then $|g_n(x')-g_n(x)| \leq 1$. Also note that $g_n(x)+g_m(x+n)=g_{n+m}(x)$ and that the integers are dense mod $2\pi$. Combining these facts tells us that if $|g_n(x)|$ is ever at least $C$, then $|g_n(k)|$ is at least $C-1$ for an integer $k$ and thus $g_k(0) + g_n(k) = g_{n+k}(0)$ which implies that either $|g_k(0)|$ or $|g_{n+k}(0)|$ is at least $\frac{C-1}2$. Therefore, showing that $g_n$ is not uniformly bounded would imply that the original sequence is not bounded either.
We therefore shift our focus to showing that the sequence $g_n$ is not uniformly bounded. To do so, we compute some Fourier coefficients. For odd integers $a$ we have
$$\int_{0}^{2\pi}f(x)e^{iax}\,dx=\frac{4i}a$$
and from that we can derive:
$$\int_{0}^{2\pi}g_n(x)e^{iax}\,dx=\frac{4i}a\cdot (1 + e^{-ia}+e^{-2ia}+e^{-3ia}+\ldots+e^{-(n-1)ia}).$$
For a fixed $a$ not a rational multiple of $\pi$, the supremum of the sums $|\sum_{k=0}^{n-1}e^{-kia}|$ over $n$ is $\frac{2}{|1-e^{-ia}|}$  by using the usual formula for geometric sums. Observe that $|1-e^{-ia}|$ is asymptotic to the distance of $a$ to the nearest multiple of $2\pi$ (at least when this quantity is small).
Then we get to a question about approximation which is frustratingly close to what we need: for any $\varepsilon>0$, is there some odd $a$ such that $a$ is within $\frac{\varepsilon}a$ of a multiple of $2\pi$? While Dirichlet's approximation theorem (or Hurwitz' theorem) can be used in conjunction with the knowledge that consecutive convergents of a continued fraction have coprime denominators to show that infinitely many such odd $a$ exist for some fixed $\varepsilon$, we cannot say anything about all possible choices of $\varepsilon$ - though a little ergodic theory shows that our desired statement is true for almost every irrational. To achieve our goal in general (and without trying to talk about approximating $\pi$ better than generic irrational numbers), we therefore have to look at multiple Fourier coefficients at once.
To start with, note that the convergents $\frac{p}q$ of the continued fraction to $\frac{1}{2\pi}$ have that $|p-\frac{1}{2\pi}q| < \frac{1}q$ by combining Dirichlet's approximation theorem with the knowledge that convergents minimize the quantity on the left hand side over all smaller $q$. There must be infinitely many convergents with odd denominator, since denominators of consecutive convergents are coprime. Suppressing constants, we can then say that for some $c$, there must exist infinitely many odd $a$ such that $\frac{1}{|1-e^{-ia}|} > ac$.
The usual formula for geometric series tells us that
$$1+e^{-ia}+e^{-2ia}+\ldots + e^{-(n-1)ia} = \frac{1 - e^{-nia}}{1-e^{-ia}}.$$
We will use this to show that some $g_n$ have many Fourier coefficients of size at least $c$, which requires selecting odd integers is that $1-e^{-ia}$ is small and then selecting $n$ such that $e^{-nia}$ is near $-1$ for all the selected $a$.
Lemma: For any finite set $a_1,\ldots,a_k$ of odd integers and any $\varepsilon$, there exists some $n$ such that $|1+e^{-nia_k}| < \varepsilon$ for all $k$.
Proof: By a similar argument about approximations as was previously used, we can find an integer $n$ that is arbitrarily close to an odd multiple of $\pi$. Note that if a real number $r$ is within $\varepsilon$ of an odd multiple of $\pi$, then for any odd integer $a$, the value $ar$ is within $a\varepsilon$ of an odd multiple of $\pi$. Since the $a_k$ are fixed and finite, we may, by choosing $n$ sufficiently close to an odd multiple of $\pi$ ensure that all the values $na_k$ are arbitrarily close to odd multiples of $\pi$. The lemma immediately follows.
To finish, we can, for any $k$, select $k$ values $a_1,\ldots,a_k$ such that $\frac{1}{|1-e^{-ia_k}|} > a_kc$. Using the lemma, we may then choose $n$ such that $|1-e^{-ina_k}| > 1$ for all $k$. The quotients $\frac{1-e^{-ina_k}}{1-e^{-ia_k}}$ then all have absolute value at least $a_kc$ and thus $a_k^{th}$ Fourier coefficients of $g_n$ are all at least $\frac{4c}{\pi}$ in absolute value. Since there exist $g_n$ with arbitrarily many Fourier coefficients that are greater than some fixed lower bound, the sequence $g_n$ is not bounded in $L^2$ and thus is not uniformly bounded. Applying the first lemma, we find that the sequence $g_0(0), g_1(0), g_2(0), \ldots$ is not bounded. This proof extends to all irrational periods with minor modification.
A: Not an answer.
This question is insanely delicate. Let me explain what is going on.
The sequence $s: =(\operatorname{sgn}(\sin(n)))_{n=1}^\infty$ is usually periodic with period $+,+,+,-,-,-$, except sometimes you have four pluses or four minuses. Let  $H(N) := \#\{n \le N : \{\frac{n}{2\pi}\} \in (0,\frac{1}{2}-\frac{3}{2\pi})\}$ and $S(N) := \#\{n \le N : \{\frac{n}{2\pi}\} \in (\frac{1}{2},1-\frac{3}{2\pi})\}$. The times when $s$ has four pluses in a row is exactly when $n \in H(N)$ ($s$ has a plus at $n,n+1,n+2,n+3$), and the times when $s$ has four minuses in a row is exactly when $n \in S(N)$ ($s$ has a minus at $n,n+1,n+2,n+3$).
Therefore, $\sum_{n \le N} \operatorname{sgn}(\sin(n)) = H(N)-S(N)+O(1)$, where the $O(1)$ term just comes $N$ being in the middle of a "period" of $+,+,+,-,-,-$. In terms of boundedness, we can ignore the $O(1)$ term, and figure out whether $H(N)-S(N)$ is unbounded.
Form a sequence $t$ of $+$'s and $-$'s by starting at $n=1$, increasing $n$, putting a $+$ if $n$ lies in $H(N)$, and putting a $-$ if $n$ lies in $S(N)$. Then $t$ alternates between $+$ and $-$, except sometimes there are two $+$'s in a row, and sometimes there are two $-$'s in a row. And it usually alternates which of $+$ or $-$ occurs twice in a row. The reason for $+$ and $-$ usually alternating is that if $n \in H(N)$, then this usually means that $n+22 \in S(N)$, and if $n \in S(N)$, then this usually means that $n+22 \in H(N)$.
Rigorously, there is a bijection between the set of $n$ with $\{\frac{n}{2\pi}\} \in \left(0,\frac{\pi-3}{2\pi}-(\{\frac{22}{2\pi}\}-\frac{1}{2})\right)$ and the set of $n$ with $\{\frac{n}{2\pi}\} \in \left(\frac{1}{2}+(\{\frac{22}{2\pi}\}-\frac{1}{2}),\frac{1}{2}+\frac{\pi-3}{2\pi}\right)$. Therefore, if we let $H'(N) = \#\{n \le N : \{\frac{n}{2\pi}\} \in \left(\frac{\pi-3}{2\pi}-(\{\frac{22}{2\pi}\}-\frac{1}{2}),\frac{\pi-3}{2\pi}\right)\}$ and $S'(N) = \#\{n \le N : \{\frac{n}{2\pi}\} \in \left(\frac{1}{2},\frac{1}{2}+(\{\frac{22}{2\pi}\}-\frac{1}{2})\right)\}$, then $H(N)-S(N) = H'(N)-S'(N)+O(1)$, where the $O(1)$ term is for the same kind of reason as before (the mentioned bijection might be off from a bijection by $1$ due to restricting to $n \le N$).
Therefore, we just have to determine whether $H'(N)-S'(N)$ is unbounded. The associated $+,-$ pattern is now periodic with period $-,+,+,-,+,+,-,+,+,-,-,+,-,-,+,-,-,+,-,-,+,+$, except for some defects. So you have to study the defects.
The point of all of this is that whether $\sum_{n \le N}\text{sgn}(\sin(n))$ is bounded or unbounded is actually determined by all of these $O(1)$ terms adding up, since we'll keep encountering nearly periodic sequences. [I hope my point is clear; there is something subtle going on. Even though the $O(1)$ terms don't matter individually (e.g. whether $\sum_{n \le N} \text{sgn}(\sin(n))$ is bounded is equivalent to whether $H(N)-S(N)$ is bounded even though they differ by a $O(1)$ term), they matter when added together].
I feel like all of this is related to the continued fraction expansion of $\pi$. I'll think about this more later.
