Let $$S(x,n) = \sum_{d|n} x^d, \quad n \in \Bbb N. $$
Do these sums appear in the literature? What are they called if they do and what is known about them?
To clarify, note that this sum is not the same as the generalized divisor function $$ \sigma_x(n) = \sum_{d|n}d^x.$$ The function $f(n) = n^x$ is an arithmetic function for any constant $x$ (in the sense that $f(pq) = f(p)f(q)$ for primes $p,q$), so the method of Möbius inversion may be applied to study $\sigma_x(n)$. In constrast, $f(n) = x^n$ is not arithmetic when $x\neq 1$ or $0$, which suggests the functions $S(x,n)$ may require the use of other less-common techniques to understand their behavior.
This is not a complete answer, but here are some examples of specializations of $S(x,n)$ which do appear in the literature:
$S(1,n) = \sigma_0(n)$, the number of divisors function.
$S(-1,n) = \#(\text{even divisors}) - \#(\text{odd divisors})$. This function sends $n = 2^v m$, where $m$ is odd, to $$ S(-1,2^vm) = (-1+v)\sigma_0(m).$$
$S(\frac12,2^k) = \sum_{i=0}^k (\frac12)^{2^i}$, in the limit $k\to \infty$, is known as Kempner's number which is known to be transcendental (Kempner, 1916). I learned of this via this stackexchange question.
Question: Is it clear what happens for $S(\zeta_k,n)$, where $\zeta_k$ is a primitive $k$-th root of unity? I couldn't find a nice closed form.
Note that even though $f(n) = (-1)^n$ is not an arithmetic function, the sum over divisors $S(-1,n)$ is ''very close'' to being arithmetic: the formula given above shows that $-S(-1,n)$ is (weakly) arithmetic . I'm guessing there might be some similar sense in which $S(\zeta_k, n)$ is close to being arithmetic, but it's probably too much to hope for that the same holds for $S(x,n)$ in general (as a function of $n$).