Pseudo-periodicity of analytic self-maps of the upper half-plane I have a couple of questions, in increasing order of softness:
Consider an analytic map of the upper-half plane into itself $f: \mathbb{H}\to\mathbb{H}$. When this function is $1$-periodic, i.e., $f(z+1) = f(z)$, then one can expand $f$ into a Fourier series (sometimes called the $q$-expansion in this context). I'm interested in functions that have a "pseudo-periodicity" property, say, $f(z+3)=f(z)+1$. Is there anything that can be said about the form $f$ must take in this case?
More generally, I am interested in analytic maps $f: \mathbb{H}\to\mathbb{H}$ which satisfy a "pseudo-equivariance" (is there a better name for this?) condition: given a finite index subgroup $H<{\rm PSL}(2,\mathbb{Z})$, there is some virtual endomorphism* $\phi: H\to G$ such that
$$f(g.z) = \phi(g).f(z)$$
for every $g\in H$. Basically this will correspond to a set of functional equations that $f$ must satisfy. My general hope is that if one is given sufficiently many of these functional equations, then the map $f$ will be more or less determined. My reasoning is that if one can determine the fundamental domain of $f$ under the action of $H$, and also determine the image of this domain, then it should be possible to determine the map everywhere else as well.
The theory of modular forms seemed like a good starting place for results along these lines, but the transformation condition for modular forms is quite different and I don't think there's a neat trick to transfer my problem into the modular form setting. Does anyone know any theories/papers which might be relevant here? I feel like problems of this sort have probably been studied before, but my google skills are failing me.

*A virtual endomorphism of a group $G$ is a homomorphism from a subgroup of finite index $H \leq G$ into $G$.
 A: I will address the 2nd question in your post. The setting is that you have two discrete subgroups $\Gamma_1, \Gamma_2< PSL(2,{\mathbb R})$ acting on the hyperbolic plane ${\mathbb H}$ (the upper half-plane model) so that the quotients have finite area. For instance, finite index subgroups of $PSL(2, {\mathbb Z})$ satisfy this assumption. You are interested in (noncostant, I assume) holomorphic maps
$f: {\mathbb H}\to {\mathbb H}$ which are equivariant with respect to some homomorphisms $\phi: \Gamma_1\to \Gamma_2$. For instance, if $|\Gamma_2: \Gamma_1|<\infty$, such $\phi$ is a virtual endomorphism of $\Gamma_2$ in your terminology. You are asking if one can find a certain (finite) subset $\{\gamma_1,...,\gamma_n\}\subset \Gamma_1$ such that the equivariance conditions ("functional equations")
$$
\phi(\gamma_i) \circ f= f\circ \gamma_i, i=1,...,n,
$$
completely determine $f$. The answer to this is positive. What is important here is not how big is $n$, but, rather, that $\gamma_1,...,\gamma_n$ generate the group $\Gamma_1$. Then the values $\phi(\gamma_i), i=1,...,n$ completely determine the homomorphism $\phi$. The question, thus, reduces to:
Theorem. Suppose that $f_1, f_2$ are two nonconstant holomorphic functions as above, equivariant with respect to the same homomorphism $\phi$. Then $f_1=f_2$.
Proof. Fir of all, observe that a $\phi$-equivariant holomorphic map $f$ descends to a holomorphic map $F: \Sigma_1\to \Sigma_2$ of the quotient Riemann surfaces (actually, orbifolds), $\Sigma_k={\mathbb H}/\Gamma_k, k=1,2$. With a careful choice of base-points $x_k$ in the surfaces, the map $F$ induces the homomorphism
$$
\pi_1(\Sigma_1, x_1)\to \pi_1(\Sigma_2, x_2)
$$
which equals to $\phi$ under the isomorphism of the respective orbifold fundamental groups and the groups $\Gamma_1, \Gamma_2$. I am not sure if you are familiar with stacks/orbifolds, but there is a trick which allows one to work with ordinary Riemann surfaces: There are finite index torsion-free subgroups $\Gamma_k'< \Gamma_k, k=1, 2$ such that $\phi(\Gamma'_1)< \Gamma'_2$. Then we can work with the pair of subgroups $\Gamma_1', \Gamma_2'$ instead of the original groups and avoid dealing with stacks/orbifolds. Thus, let me assume from the beginning that the groups $\Gamma_1, \Gamma_2$ are torsion-free. Then we can simply use the standard tools of algebraic topology and talks about ordinary fundamental groups.
Remark. It is not important at this point, but choosing deeper finite index subgroups, we can ensure that both $\Sigma_1, \Sigma_2$ have genus $\ge 2$.
What we have, now are two nonconstant holomorphic maps $F_1, F_2: \Sigma_1\to \Sigma_2$ inducing the same homomorphism of fundamental groups. I claim that the maps $F_1, F_2$ are equal. This is very classical in the case when surfaces $\Sigma_1, \Sigma_2$ are compact, of genus $\ge 2$: The reference I know is
Martens, Henrik H., Observations on morphisms of closed Riemann surfaces, Bull. Lond. Math. Soc. 10, 209-212 (1978). ZBL0384.14008.
although, surely, this was known before. Martens notes that even the induced homomorphism of 1st homology groups determines the holomorphic map. Our surfaces need not be compact. However, each finite area hyperbolic Riemann surface $\Sigma$ admits a completion $\Sigma\hookrightarrow \hat\Sigma$ to a compact Riemann surface $\hat\Sigma$ by "filling in the punctures". More formally, $\hat\Sigma$ is a compact Riemann surface, $\Sigma\hookrightarrow \hat\Sigma$ is a holomorphic embedding whose image is dense in $\hat\Sigma$: the complement $\hat\Sigma \setminus \Sigma$ is finite.
One proves, using the Riemann extension theorem,
Lemma. Suppose that $\Sigma_1, \Sigma_2$ are hyperbolic Riemann surfaces and $\Sigma_1$ has finite area. Suppose that
$F: \Sigma_1\to \Sigma_2$  is a nonconstant holomorphic map. Then the surface $\Sigma_2$ also has finite area and $F$
admits a holomorphic extension $\hat{F}: \hat\Sigma_1\to \hat\Sigma_2$. (This, of course, is false for non-hyperbolic Riemann surfaces.)
Now, back to our setting: We have two holomorphic maps $F_1, F_2: \Sigma_1\to \Sigma_2$, where $\Sigma_1, \Sigma_2$ are hyperbolic Riemann surfaces of finite area and genus $\ge 2$, such that $F_1, F_2$ induce the same homomorphism of fundamental groups. One next observes that the holomorphic extensions
$$
\hat{F}_k: \hat\Sigma_1\to \hat\Sigma_2, k=1,2$$
still induce the same homomorphism of fundamental groups. Moreover, in view of the genus condition, the compact Riemann surfaces  $\hat\Sigma_1, \hat\Sigma_2$ are of hyperbolic type. Hence, as noted above, $\hat{F}_1=\hat{F}_2$, implying that $F_1=F_2$.
We are almost done, as we need to prove the equality $f_1=f_2$. What we get from the above is that there exists $\gamma\in \Gamma_2$ such that $f_2=\gamma\circ f_1$. The fact that $f_1, f_2$ are both $\phi$-equivariant, implies that
$$
Inn_\gamma\circ \phi=\phi,
$$
where
$$
Inn_\gamma: \alpha\mapsto \gamma \alpha \gamma^{-1},
$$
the inner automorphism of $\Gamma_2$ defined by $\gamma$. It then follows that $\gamma$ commutes with all elements of $\Lambda=\phi(\Gamma_1)$. However, the centralizer of a discrete subgroup $\Lambda$ of $PSL(2, {\mathbb R})$ is trivial unless  $\Lambda$ is cyclic. In our case, $\Lambda$ cannot be cyclic for the following reason: The nonconstant holomorphic map $h=f_1$ descends to a nonconstant holomorphic map $H: {\mathbb H}/\Gamma_1\to {\mathbb H}/\Lambda$. If $\Lambda$ were cyclic, the area of ${\mathbb H}/\Lambda$ would be finite. But this contradicts Lemma above. Thus, we conclude that $\gamma=1$ and, hence, $f_1=f_2$.
Lastly, there is a vast area of complex analysis that studies the following pairs $(f,\phi)$: $\Gamma< PSL(2, {\mathbb R})$ is a discrete subgroup, $\phi: \Gamma\to PSL(2, {\mathbb C})$ is a homomorphism and $f: {\mathbb H}\to CP^1$ is a $\phi$-equivariant holomorphic map. Take a look
Hejhal, Dennis A., Monodromy groups and linearly polymorphic functions, Acta Math. 135, 1-55 (1975). ZBL0333.34002.
This paper and its bibliography are dated, but it gives you some idea about the area. Here is one classical result (from 1920s), related to Theorem above:
Suppose, in the above setting, that the surface $\Sigma={\mathbb H}/\Gamma$ is compact and the map $f: {\mathbb H}\to CP^1$ is locally univalent (i.e. has nowhere vanishing derivative). Then $\phi$ completely determines $f$.
I am quite sure that Theorem proven earlier is also classically known, but it is easier to give a proof than to find a reference.
A: Does this help?
$ f(z+3)= f(z)+1 \iff f(3z+3)= f(3z)+1 \iff f(3(z+1)) = f(3z)+1$. Let $g(z)= f(3z)$.
Then $g(z+1) =g(z)+1 \iff  e^{ 2\pi I [g(z+1) - g(z)]}=1 \iff h(z):= e^{ 2\pi I g(z)}$ is periodic with period $\Delta z=1$.
