Let $n \in \mathbb N$. Let's say a complex function $f: U \rightarrow \mathbb C$ is "of type $k \pmod n$" if for one (and hence every) primitive $n$-th root of unity $\omega$,
$$f(\omega z) = \omega^k f(z)$$
for all $z\in U \subseteq \mathbb C$. (Obviously the domain $U$ has to be closed under multiplying with $\omega$.)
For $f$ analytic around $0$, this is equivalent to: In the Taylor expansion $f(z) = \sum a_m z^m$, all $a_m$ except possibly those with $m \equiv k \pmod n$ are zero.
The sum of two functions of type $k \pmod n$ is again of type $k \pmod n$. The product of a function of type $k \pmod n$ and a function of type $l \pmod n$ is of type $(k+l) \pmod n$. Also, the derivative of a differentiable function of type $k \pmod n$ is of type $k-1 \pmod n$.
For $n=2$, this retrieves the classical "even" and "odd functions" taught to this day in high schools.
I just stumbled upon these, or shifts of them, as rare exceptional solutions to functional identities which otherwise usually have no interesting solutions. I wondered if there is a better name for them, and if they are useful in some theory I have missed.
(This seems to be at least one level of difficulty below modular forms of weight $k$, but maybe somebody can take me by the hand and show a connection to those. Or to the seemingly very different generalization here, maybe bringing in representation theory of the cyclic group $\mathbb Z/n$.)