I've been reading about monodromy representations of the fundamental group of a nice connected space $X$ and the equivalence of these with local systems on $X$. Whilst thinking about a very simple nontrivial example I encountered (what I thought was) an interesting question regarding residues in complex analysis.
Let's look at $\mathbb{C}\backslash \left\{0\right\}$ and let $D$ be a small open disc centred and punctured at $0$ with radius $r>1$. We'll choose $1\in D$ as the basepoint for the fundamental group $\pi_1 (D,1)$. Consider the local system of solutions on $D$ of the first order ODE
$$y'(z) = f(z)y(z)$$
where $f$ is holomorphic on $D$ and extends meromorphically to $0$. Local solutions to this equation at some point $x\in D$ are given by a complex vector space of dimension $1$, namely all complex multiples of the function
$$\exp \circ F$$
where $F$ is a 'local primitive' of $f$ around $x$. So we get a complex local system $S$ on $D$, associating to an open set $U\subseteq D$ the vector space $S(U)$ of local solutions over $U$. By the equivalence
$$(\text{finite-dimensional complex reps of }\pi_1 (D,1))\simeq (\text{complex local systems on } D)$$
this system of solutions correspond to a representation of the fundamental group: in fact, it is a one-dimensional monodromy representation obtained by taking the fibre above $1\in D$. Explicitly, $\pi_1 (D,1)=\mathbb{Z}$, so let $\gamma$ be a generator for this group corresponding to going once counterclockwise round the unit circle in $D$. Then the monodromy representation is
$$\pi_1 (D,1)\to GL_1 (\mathbb{C}) = \mathbb{C}^\times, \quad \gamma\to m.$$
Here $m$ is the nonzero complex number that multiplies the germ of a solution $y(z)$ after analytic continuation around $\gamma$. We can calculate
$$m = \exp\left( \int_\gamma f(z) dz\right) = \exp\left(2\pi i\cdot \text{Res}_0 (f)\right).$$
We notice that if $\text{Res}_0 (f) \in\mathbb{Z}$ then the monodromy representation of $\pi_1 (D,1)$ is trivial, and if it is rational then it takes values in some cyclic subgroup of $\mathbb{C}^\times$. Is there a 'high-level' explanation of why there's this strict difference in the representations between functions with integer residues at $0$ and those with more algebraically 'complicated' residues at $0$? And what happens if the residues are algebraic of higher degree, or trancendental?