Let

$$f_k(z)=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^k\sin(\pi zn)}$$

be a family of holomorphic functions on the upper-half plane $\mathbb{H}=\{a+bi|b>0\}$ for each odd natural number $k$. These functions clearly satisfy the periodicity condition $f_k(z+2)=f_k(z)$, but more surprisingly they also satisfy the formula

\begin{equation} z^{\frac{1-k}{2}}f_k(z)+z^{\frac{k-1}{2}}f_k\left(\frac{1}{z}\right)=\sum_{j=0}^{k+1}a_{k,j}z^{\frac{k+1}{2}-j}\tag{1} \end{equation}

where $a_{k,j}$ are given by

\begin{equation} a_{k,j}:=\frac{(-1)^{\frac{k+1}{2}}(2\pi)^k}{(k+1)!}{k+1\choose j}B_j\left(\frac{1}{2}\right)B_{k+1-j}\left(\frac{1}{2}\right)\tag{2} \end{equation}

where $B_j(\cdot)$ are the Bernoulli polynomials. I discovered and proved this formula a year ago and didn't think much of it, but recently I have begun thinking about there recurrences in the context of modular/cusp forms and $L$-functions. More specifically, these two formulas seem quite similar to those of a cusp form of weight $1-k$ over the congruence subgroup $\Gamma(2)$. The match isn't perfect because of the extraneous polynomials that pop up on the LHS of (2), but it still makes one wonder.

Another piece of evidence that the functions $f_k(\cdot)$ are connected to modular forms is that they naturally induce $L$-functions in the same way that modular forms do. In this context I mean that if a modular form $g$ of weight $k$ has $q$-expantion $g(z)=\sum_{n}a_n n^{\frac{k-1}{2}}q^n$ then it induces the $L$-function $L(g,s)=\sum_{n}a_n n^{-s}$. The $L$-function attached to $f_k(z)$ is

\begin{align} L(f_k,s)&=2i\frac{1-2^{1-\frac{k}{2}-s}}{1-2^{-\frac{k}{2}-s}}\zeta\left(s-\frac{k}{2}\right)\zeta\left(s+\frac{k}{2}\right)\\ &=2i\frac{1-2^{1-\frac{k}{2}-s}}{1-2^{-\frac{k}{2}-s}}\prod_{p}\frac{1}{1-\left(p^{\frac{k}{2}}+p^{-\frac{k}{2}}\right)p^{-s}+p^{-2s}} \tag{3}\end{align}

Making $L(f_k,s)$ a degree 2 $L$-function with a critical line $\Re(s)=\frac{1}{2}$. $L(f_k,s)$ is not of the Selberg class of $L$-functions since there is no function $\gamma_k(s)$ such that $\Lambda_k(s):=\gamma_k(s)f_k(s)$ satisfies $\Lambda_k(1-s)=\Lambda_k(s)$.

I suspect that the fact that the $L$ function generated is "almost" of the Selberg class corresponds to the fact that $f_k(z)$ is "almost" a cusp form. My overall goal with connecting $f_k(z)$ to modular forms would be to learn something non-trivial about the cosecant function $\frac{1}{\sin(\pi zr)}$ or to use the fact that the vector space of cusp forms $S_k(\Gamma(2))$ is finite dimensional and has a simple basis to find a new way to compute

$$\sigma_k^{(o)}(n):=\sum_{\substack{d|n \\ d\equiv 1\mod{2}}}d^k$$

since the $q$-expantion of $f_k(z)$ is

$$f_k(z)=\sum_{n=1}^{\infty}\frac{(-1)^{n-1}\sigma_k^{(o)}(n)}{n^k}q^n$$