Evaluating $\sum_{n=1}^{\infty} \frac{\phi(n)}{7^n + 1}$, where $\phi(n)$ is Euler's totient function

7 is not special at all. We can replace it with any $a>1$ (even real numbers). \begin{align*} \sum_{n=1}^{\infty} \frac{\phi(n)}{a^{n}+1} &= \sum_{n=1}^{\infty}\phi(n) \frac{a^{-n}}{1+a^{-n}} = \sum_{n=1}^{\infty} \phi(n)a^{-n}(1-a^{-n}+a^{-2n}-\cdots) \\ &= \sum_{n=1}^{\infty}\sum_{k=1}^{\infty} \phi(n)(-1)^{k+1}a^{-kn} \\ &= \sum_{m=1}^{\infty} \sum_{d|m} (-1)^{\frac{m}{d}+1}\phi(d)a^{-m} \\ &= -\sum_{m=1}^{\infty} a^{-m}\left(\sum_{d|m} (-1)^{\frac{m}{d}}\phi(d)\right) \end{align*} Now we will show the following: $$ \sum_{d|m}(-1)^{\frac{m}{d}}\phi(d) = \begin{cases} 0 & m\text{ is even} \\ -m & m\text{ is odd} \end{cases} $$ If $m$ is odd, then $\sum_{d|m}(-1)^{\frac{m}{d}}\phi(d) = -\sum_{d|m}\phi(d) = -m$. If $m$ is even, let $m = 2^{k}t$ for odd $t$ and $k\geq 1$. Then $$ \sum_{d|m}(-1)^{\frac{m}{d}}\phi(d) = \sum_{d|t}\phi(d) + \sum_{d|t}\phi(2d) + \cdots + \sum_{d|t}\phi(2^{k-1}d) - \sum_{d|t}\phi(2^{k}d) = (1+\phi(2)+\cdots + \phi(2^{k-1})-\phi(2^{k}))\sum_{d|t}\phi(d) = 0 $$ (Here we use the multiplicativity of $\phi$.)

Hence the sum equals to $$ \sum_{k=0}^{\infty} \frac{2k+1}{a^{2k+1}} = \frac{a(a^{2}+1)}{(a^{2}-1)^{2}} $$


Another approach is to use Lambert Series generating function: $$ \begin{align} \frac{q}{(1-q)^2} &=\sum_{n=1}^{\infty}\frac{\phi(n)q^n}{1-q^n}=\sum_{n=1}^{\infty}\frac{\phi(n)}{q^{-n}-1} \space\colon\space |q|\lt1\implies \\ \frac{q^2}{(1-q^2)^2} &=\sum_{n=1}^{\infty}\frac{\phi(n)}{q^{-2n}-1} =\frac12\sum_{n=1}^{\infty}\left[\frac{\phi(n)}{q^{-n}-1}-\frac{\phi(n)}{q^{-n}+1}\right] \end{align} $$ Hence: $$ \begin{align} \color{red}{\sum_{n=1}^{\infty}\frac{\phi(n)}{q^{-n}+1}}&=\sum_{n=1}^{\infty}\frac{\phi(n)}{q^{-n}-1}-2\sum_{n=1}^{\infty}\frac{\phi(n)}{q^{-2n}-1} \\ &=\frac{q}{(1-q)^2}-\frac{2\,q^2}{(1-q^2)^2}=\color{red}{q\,\frac{1+q^2}{(1-q^2)^2}} \end{align} $$