Loops when drawing constantly changing angles and lines. I start by drawing a line of 1 unit on the $x$ axis. I turn left (from the perspective of an ant on the line) by an angle of $\alpha$ and I draw a second segment of length $u$ from my endpoint of the first segment. I then turn another angle $\alpha$ and then draw a $3^{rd}$ segment of length 1, etc. alternating between segments of length $1,u,1,u,...$ and rotating by a fixed angle each time. I am interested in when does this process returns to the origin and how long does it take for it to return when it does.
We work in the complex plane. Let $z=e^{i\alpha}$. Then the path is:
$$1+uz+z^2+uz^3+z^4+uz^5+\cdots$$
If $1+uz=0$, meaning $u=1$ and $\alpha=\pi$, then we return to $0$ after $2$ steps. Otherwise, assume that $1+uz\neq0$.

Suppose the path returns to $0$ after $2N$ steps for $N&gt;1$. Then we can solve for this:
$$0=(1+uz)\sum_{k=0}^{N-1}z^{2k}$$
Divide out $(1+uz)$:
$$0=\sum_{k=0}^{N-1}z^{2k}$$
This is true if and only if $z^{2N}=1$ and $z^2\neq1$. In other words, $\alpha$ is a multiple of $\pi/N$, but not $0$ or $\pi$. Note that $u$ is irrelevant!

Tackling an odd number is harder. Suppose the path returns to $0$ after $2N+1$ steps. Then:
$$0=z^{2N+1}+(1+uz)\sum_{k=0}^{N-1}z^{2k}=z^{2N+1}+(1+uz)\frac{1-z^{2N}}{1-z^2}$$
$$0=z^{2N+1}-z^{2N+3}+1+uz-z^{2N}-uz^{2N+1}$$
That's a really messy equation, and I'm not sure if there's a simple class of solutions.
The named system of equations solving for $n=2k,\alpha,u$ should be:
$$
u \sum_{i=0}^k \cos((2k+1)\alpha)+\sum_{i=0}^k \cos(2k\alpha)=0\\
u \sum_{i=0}^k \sin((2k+1)\alpha)+\sum_{i=0}^k \sin(2k\alpha)=0
$$
Hence the solution for a given $k$, if exists, is given by:
$$
u = -\frac{\sum_{i=0}^k \cos(2k\alpha)}{\sum_{i=0}^k \cos((2k+1)\alpha)}\\
 \frac{\sum_{i=0}^k \cos(2k\alpha)}{\sum_{i=0}^k \cos((2k+1)\alpha)} = \frac{\sum_{i=0}^k \sin(2k\alpha)}{\sum_{i=0}^k \sin((2k+1)\alpha)}
$$
Which as you see, would have a closed form for some circular symmetry values for $\alpha$....