# Ramanujan type sum

Let $$f_b(x)=\sum\limits_{a=1 , (a,b)=1}^{b}\frac{1}{1-e^{2\pi i \frac{a}{b}}x}$$ For example:

$$f_6(x) = \frac{1}{1-e^{2\pi i \frac{1}{6}}x}+\frac{1}{1-e^{2\pi i \frac{5}{6}}x}$$

I'm wondering if there is a simple closed for for my function. For instance, if we get rid of the $(a,b)=1$ condition, we see that $$\sum\limits_{a=1 }^{b}\frac{1}{1-e^{2\pi i \frac{a}{b}}x}=\frac{b}{1-x^b}$$ Which is very nice. And when we add in the coprime condition, we are reducing the case to primitive roots of unity.

Define $$g_b(x) = \sum\limits_{a=1 }^{b}\frac{1}{1-e^{2\pi i \frac{a}{b}}x}.$$ Then it's clear that $$g_b(x) = \sum_{d\mid b} f_b(x)$$ (where the sum is over all positive integers $d$ dividing $b$). By Mobius inversion, we conclude that $$f_b(x) = \sum_{d\mid b} \mu(b/d) g_d(x) = \sum_{d\mid b} \mu(b/d) \frac d{1-x^d}.$$