Why does the Complex Modulo Function $1 \bmod z$ Look Very Similar to the Riemann Zeta Function When Graphed? I recently watched 3Blue1Brown's video on the Riemann Zeta Function. At around the 11:00 minute mark, there's an interesting visualization of the function graphed in the complex plane. As an amateurish interest, I built up a complex graphing calculator using HSL graphing in JavaScript, only considering hue for the complex argument. I defined the complex modulo operation as $z_1 \bmod z_2 = z_1 - z_2 \left\lfloor \frac{z_1}{z_2} \right\rfloor$ and the complex floor function as $\lfloor z \rfloor = \lfloor \Re(z) \rfloor + \lfloor \Im(z) \rfloor$. Here is the function $1 \bmod z$ graphed vs. 3Blue1Brown's graph:

I don't know much about Complex Analysis, but these two functions seem to have the same underlying structure, at least to my eyes. What connection is there between the modulo function and the Riemann Zeta Function? I also don't think I've seen this shape in mathematics before. Are there any other places where this shape shows up? Forgive my ignorance if the answers are trivial. Also, thank you very much for spending the time to answer questions from newbies to math like me.
 A: What creates those circular arches in the Riemann zeta function graph is actually the behavior around the pole s=1. Check this video out: transformation of function. As you get closer to s=1, the Riemann zeta function behaves a lot like $$f(z)=\frac{1}{z-1} + \gamma$$ These are the leading terms in the Laurant series expansion for $\zeta(s)$. So those circular arches actually come from the term $\frac{1}{1-s}$. If you were to plot the parametric function $f(t) = \frac{1}{(a+it) - 1}$ in the complex plane, you would obtain the following equation for a circle
$$\bigg(x-\frac{1}{2(a-1)}\bigg)^2+y^2=\frac{1}{4(a-1)^2}$$
I wrote a full derrivation here: In short, when you apply the function to grid lines in the complex plane, circles are created. The closer the line is to the pole of the function, the larger the circle created. That's why visually all the circles in the Riemann Zeta function transformation appear to expand from the pole at s=1.
This transformation--interestingly--shows up as sudden color changes in your HSL graph. This means that the circular arch pattern that shows up actually represents the boundaries where your floor function has discontinuities (the function output suddenly changes to a different part of the complex plane). You are graphing the function $$m(z) = 1-z \lfloor \frac{1}{z} \rfloor$$ The discontinuities likely come from the $\lfloor \frac{1}{z} \rfloor$ term. If we let $z=a+bi$, The term $\frac{1}{z}$ is discontinuous when $$\frac{1}{a+bi}=j+ki, (j,k \in \mathbb{Z})$$. The values that satisfy these equations are the parametric lines $t+bi$, or $a+ti$ applied as inputs to $f(z)$ where $a,b \in \mathbb{Z}$. These lines trace out a coordinate grid in the complex plane. In other words, the boundaries along which $m(z)$ experiences jump discontinuities (where your graph changes colors and shows those circles) are exactly when you take a coordinate grid in the complex plane (with lines evenly spaced with interval 1) and apply the complex function $f(z)=\frac{1}{z}$. Using a similar derivation as above for a vertical line $a+it$, we can obtain the parametric equations
$$x(t)=\frac{a}{a^2+t^2}; y(t)=\frac{-t}{a^2+t^2}$$
These generate the circle:
$$\bigg(x-\frac{1}{2a}\bigg)^2+y^2=\frac{1}{4a^2}$$
These are circles that are tangent to the imaginary (or y) axis. Note that this circle only represents horizontal lines after the transformation. A similar derivation can be done for $t+bi$ to obtain circles tangent to the real axis. As a gut check, plugging values for 1,2,3 yield circles with radius 1, 1/2, 1/4 respectively. These are the same circles that appear in your graph.
