We study Lambert series generating functions associated with arithmetic functions \(f\), defined by
$$L_f(q)=\sum_{n\ge1}\frac{f(n)q^n}{1-q^n}=\sum_{m\ge1}(f*1)(m)q^m.$$
These expansions naturally generate divisor sums through Dirichlet convolution with the constant-one function and provide a useful framework for enumerating ordinary generating functions of many multiplicative functions in number theory. This paper presents an overview of key properties of Lambert series, together with combinatorial generalizations and a compendium of formulas for important special cases. The emphasis is on formal and structural aspects of the sequences generated by these series rather than on analytic questions of convergence. In addition to serving as an introduction, the paper provides a consolidated reference for classical identities, recent connections with partition-generating functions, and other useful Lambert series expansions arising in applications.
| Symbol | Definition |
|---|---|
| \(B_n(x),\,B_n\) | The Bernoulli polynomials and Bernoulli numbers \(B_n=B_n(0)\). These polynomials can be used via Faulhaber’s formula, among others, to generate the integral \(k^{\mathrm{th}}\) power sums \(\sum\limits_{d\mid n}\phi_k(d)(n/d)^k=1^k+2^k+\cdots+n^k\). |
| \(\binom{n}{k}\) | The binomial coefficients, \(\binom{n}{k}=\dfrac{n!}{k!(n-k)!}\). |
| \([x]\) | The ceiling function \([x]:=x+1-\{x\}\) where \(0\le \{x\}<1\) denotes the fractional part of \(x\in\mathbb{R}\). |
| \(\{x\}\) | The fractional part of \(x\). Defined as \([x]-\lfloor x\rfloor\). |
| \([q^n]F(q)\) | The coefficient of \(q^n\) in the power series expansion of \(F(q)\) about zero. |
| \(c_q(n)\) | Ramanujan’s sum, \(c_q(n):=\sum\limits_{d\mid(q,n)} d\,\mu(q/d)\). |
| \(d(n),\,d_k(n)\) | The ordinary divisor function is defined as \(d(n):=\sum\limits_{d\mid n}1\). The generalized \(k\)-fold divisor function is defined as \(d_k(n)=(\mathbf{1}^{*k}\mathbf{1})(n)\) whose DGF is \(\zeta(s)^k\). Note that the divisor function \(d(n)\equiv d_1(n)\). |
| \(\delta_{n,k}\) | True (one-valued) if and only if \(n\) and \(k\) are equal. Otherwise the function is zero-valued. |
| \(D_z^{(j)}\) | The higher-order \(j^{\mathrm{th}}\) derivative operator with respect to \(z\). |
| \(\varepsilon(n)\) | The multiplicative identity with respect to Dirichlet convolution, \(\varepsilon(n)=\delta_{n,1}\), where \(\delta_{n,k}\) is one if \(n=k\) and zero-valued otherwise. |
| \(*,\,f*g\) | The Dirichlet convolution of \(f\) and \(g\), \(f*g(n):=\sum\limits_{d\mid n} f(d)g(n/d)\), for \(n\ge 1\). This symbol for the discrete convolution of two arithmetic functions is the only notion of convolution of functions we employ within the article. |
| \(f^{-1}(n)\) | The Dirichlet inverse of \(f\) with respect to convolution defined recursively by \(f^{-1}(n)=-\dfrac{1}{f(1)}\times \sum\limits_{\substack{d\mid n\\ d>1}} f(d)f^{-1}\!\left(\dfrac{n}{d}\right)\). The Dirichlet inverse of an arithmetic function exists provided that \(f(1)\neq 0\). |
| \(\lfloor x\rfloor\) | The floor function \(\lfloor x\rfloor:=x-\{x\}\) where \(0\le \{x\}<1\) denotes the fractional part of \(x\in\mathbb{R}\). |
| \(f_{*j}\) | Sequence of nested \(j\)-convolutions of an arithmetic function \(f\) with itself for integers \(j\ge 1\). We define \(f_{*0}(n)=\delta_{n,1}\), the multiplicative identity with respect to Dirichlet convolution. |
| \(\gamma(n)\) | The squarefree kernel of \(n\), \(\gamma(n):=\prod_{p\mid n} p\). |
| \(\gcd(m,n),\,(m,n)\) | The greatest common divisor of \(m\) and \(n\). Both notations for the GCD are used interchangeably within the article. |
| \(G_j\) | Denotes the interleaved (or generalized) sequence of pentagonal numbers defined explicitly by the formula \(G_j:=\dfrac{1}{2}\left[\dfrac{j}{2}\right]\left[\dfrac{3j+1}{2}\right]\). The sequence begins as \(\{G_j\}_{j\ge 0}=\{0,1,2,5,7,12,15,22,26,35,40,51,\ldots\}\). |
| \(\mathrm{Id}_k(n)\) | The power-scaled identity function, \(\mathrm{Id}_k(n):=n^k\) for \(n\ge 1\). The Dirichlet inverse of this function is given by \(\mathrm{Id}_k^{-1}(n):=n^k\cdot \mu(n)\). |
| \(\mathbf{1}_S,\,\chi_{\mathrm{cond}}(x)\) | We use the notation \(\mathbf{1},\chi:\mathbb{N}\to\{0,1\}\) to denote indicator, or characteristic functions. In particular, \(\mathbf{1}_S(n)=1\) if and only if \(n\in S\), and \(\chi_{\mathrm{cond}}(n)=1\) if and only if \(n\) satisfies the condition cond. |
| \([n=k]_\delta\) | Synonym for \(\delta_{n,k}\) which is one if and only if \(n=k\), and zero otherwise. |
| \([\mathrm{cond}]_{\delta}\) | For a boolean-valued \(\mathrm{cond}\), \([\mathrm{cond}]_{\delta}\) evaluates to one precisely when \(\mathrm{cond}\) is true, and zero otherwise. |
| \(\vartheta_i(z,q),\,\vartheta_i(q)\) | For \(i=1,2,3,4\), these are the classical theta functions where \(\vartheta_i(q)\equiv \vartheta_i(0,q)\). These functions are respectively defined for \(|q|<1\) as \(\vartheta_1(z,q)\ :=\ \sum\limits_{n=-\infty}^{\infty} (-1)^{n-\frac12}\,q^{\left(n+\frac12\right)^2}e^{(2n+1)iz},\qquad \vartheta_2(z,q)\ :=\ \sum\limits_{n=-\infty}^{\infty} q^{\left(n+\frac12\right)^2}e^{(2n+1)iz},\) \(\vartheta_3(z,q)\ :=\ \sum\limits_{n=-\infty}^{\infty} q^{n^2}e^{2niz},\qquad \vartheta_4(z,q)\ :=\ \sum\limits_{n=-\infty}^{\infty} (-1)^n q^{n^2}e^{2niz}.\) |
| \(J_t(n)\) | The Jordan totient function \(J_t(n)=n^t\prod_{p\mid n}(1-p^{-t})\) also satisfies \(\sum\limits_{d\mid n}J_t(d)=n^t\). |
| \(\Lambda(n)\) | The von Mangoldt lambda function \(\Lambda(n)=\sum\limits_{d\mid n}\log(d)\mu(n/d)\). |
| \(\lambda(n)\) | The Liouville lambda function \(\lambda(n)=(-1)^{\Omega(n)}\), where \(\Omega(n):=\sum\limits_{p^r\parallel n} r\). |
| \(\lambda_k(n)\) | The arithmetic function defined by \(\lambda_k(n)=\sum\limits_{d\mid n} d^k\Lambda(d)\). |
| \(L_f(q)\) | The Lambert series generating function of an arithmetic function \(f\), defined by \[L_f(q):=\sum\limits_{n\ge 1}\frac{f(n)q^n}{1-q^n},\ |q|<1.\] |
| \(\mathrm{lcm}(m,n),\ [m,n]\) | The least common multiple of \(m\) and \(n\). |
| \(\log\) | The natural logarithm function, \(\log(n)=\ln(n)\). |
| \(\mathrm{lsb}(n)\) | The least significant bit of \(n\) in the base-\(2\) expansion of \(n\). |
| \(\mu(n),\,\mu_k(n)\) | The Möbius function, defined for \(n\ge 1\) with \(n=p_1^{\alpha_1}\cdots p_k^{\alpha_k}\) its factorization into distinct prime powers with \(\alpha_i\ge 1\) for all \(1\le i\le k\) by\[ \mu(n)= \begin{cases} 1, & \text{if } n=1;\\ (-1)^k, & \text{if } \alpha_i=1,\ \forall\,1\le i\le k;\\ 0, & \text{otherwise.} \end{cases} \]For fixed \(k\ge 1\), the arithmetic function \(\mu_k(n)\) generalizes the classical Möbius function. In words, the function \(\mu_k(n)\) vanishes (is zero) if \(n\) is divisible by the \((k+1)^{\mathrm{st}}\) power of a prime. Otherwise, \(\mu_k(n)\) is \(1\) unless the prime factorization of \(n\) contains the \(k^{\mathrm{th}}\) power of exactly \(r\) distinct primes, in which case, \(\mu_k(n)=(-1)^r\). If \(k\ge 2\), we have the following recurrence relation for integers \(n\ge 1\): \[\mu_k(n)=\sum\limits_{d^k\mid n}\mu_{k-1}\!\left(\frac{n}{d^k}\right)\mu_{k-1}\!\left(\frac{n}{d}\right).\] The function \(\mu_1\) is identical to the classical Möbius function. |
| \(\mathrm{OGF}\) | Ordinary generating function. Given a sequence \(\{f_n\}_{n\ge 0}\), its OGF (or sometimes called ordinary power series, OPS) enumerates the sequence by powers of a typically formal variable \(z\): \(F(z):=\sum\limits_{n\ge 0} f_n z^n\). For \(z\in\mathbb{C}\) within some radius or abscissa of convergence for the series, asymptotic properties can be extracted from the closed-form representation of \(F\), and/or the original sequence terms can be recovered by performing an inverse Z-transform on the OGF. |
| \(\omega_a\) | A primitive \(a^{\mathrm{th}}\) root of unity \(\omega_a=\exp(2\pi i/a)\) for integers \(a\ge 1\). |
| \(\omega(n),\,\Omega(n)\) | If \(n=p_1^{\alpha_1}\cdots p_r^{\alpha_r}\) is the prime factorization of \(n\) into distinct prime powers, then \(\omega(n)=r\) and \(\Omega(n)=\alpha_1+\cdots+\alpha_r\). That is, \[\omega(n)=\sum\limits_{p\mid n}1, \qquad\text{and}\qquad \Omega(n)=\sum\limits_{p^r\parallel n} r.\] |
| \(\phi(n),\,\phi_k(n)\) | Euler’s classical totient function is defined as \( \phi(n):=\sum\limits_{\substack{1\le d<n\\ (d,n)=1}}1. \) The generalized totient function is defined as \( \phi_k(n):=\sum\limits_{\substack{1\le d<n\\ (d,n)=1}} d^k. \) |
| \(\Phi_n(z)\) | The \(n^{\mathrm{th}}\) cyclotomic polynomial in \(z\) defined by \[ \Phi_n(z):=\prod_{\substack{1\le k\le n\\ (k,n)=1}} \left(z-e^{2\pi i k/n}\right). \] |
| \(p(n)\) | The partition function generated by \[p(n)=[q^n]\prod_{n\ge 1}(1-q^n)^{-1}.\] |
| \(\pi(x)\) | The prime counting function denotes the number of primes \(p\le x\). |
| \(\sum\limits_{p\le x}\) | Unless otherwise specified, we use the index variable \(p\) to denote that the summation is to be taken only over prime values within the summation bounds. |
| \(\Psi_k(n)\) | The \(k^{\mathrm{th}}\) Dedekind totient function, \(\Psi_k(n):=n^k\prod_{p\mid n}(1+p^{-k})\). |
| \(\psi_k(n)\) | The arithmetic function defined by \(\psi_k(n):=\sum\limits_{d\mid n} d^k\phi(n/d)\). |
| \((a;q)_n,\,(q)_n\) | The \(q\)-Pochhammer symbol is defined for integers \(n\ge 0\) as \[(a;q)_n:=\prod_{j=1}^{n}(1-aq^j)+\delta_{n,0}.\] We use the common shorthand that \((a_1,\ldots,a_r;q)_n:=\prod_{i=1}^{r}(a_i;q)_n\). The infinite \(q\)-Pochhammer symbol is defined as the product \[(a;q)_\infty:=\prod_{j=1}^{\infty}(1-aq^{j-1}).\] We adopt the notation that \((q)_n\equiv(q;q)_n\) and that \((a;q)_\infty\) denotes the limiting case for \(|q|<1\) as \(n\to\infty\). |
| \(r_k(n)\) | The sum of \(k\) squares function denotes the number of integer solutions to \[n=x_1^2+\cdots+x_k^2.\] A generating function is given by \[r_k(n)=[q^n]\vartheta_3(q)^k.\] |
| \(\sigma_\alpha(n)\) | The generalized sum-of-divisors function, \[\sigma_\alpha(n):=\sum\limits_{d\mid n} d^\alpha,\] for any \(n\ge 1\) and \(\alpha\in\mathbb{C}\). Note that the divisor function is also denoted by \(d(n)\equiv \sigma_0(n)\). |
| \(n\\ k ,\ \left\{ n\\ k \right\}\) | The unsigned Stirling numbers of the first and second kinds, respectively. The unsigned Stirling numbers of the first kind count the number of permutations of \(n\) elements with \(k\) disjoint cycles. The Stirling numbers of the second kind count the number of ways to partition a set of \(n\) elements into \(k\) non-empty subsets. Alternate notation for these triangles is given by \(s(n,k)=(-1)^{n-k} n\\ k\) and \(S(n,k)=\left\{ n\\ k \right\}\). |
| \(\tau(n)\) | The function defined by \(\tau(n):=[x^n]\prod_{m\ge 1}(1-x^{2m})^{24}\). |
| \(\zeta(s)\) | The Riemann zeta function, defined by \[\zeta(s):=\sum\limits_{n\ge 1}n^{-s}\quad \text{when }\Re(s)>1,\] and by analytic continuation to the entire complex plane with the exception of a simple pole at \(s=1\). |
In the most general setting, we define the generalized Lambert series expansion for integers \(0 \leq \beta < \alpha\) and any fixed arithmetic function \(f\) as \[L_f(\alpha, \beta; q) := \sum\limits_{n \geq 1} \frac{f(n) q^{\alpha n – \beta}}{1-q^{\alpha n-\beta}}; |q| < 1,\] where the series coefficients of the Lambert series generating function are given by the divisor sums \[[q^n] L_f(\alpha, \beta; q) = \sum\limits_{\alpha d-\beta| n} f(d).\]
If we set \((\alpha, \beta) := (1, 0)\), the we recover the classical form of the Lambert series construction, which we will denote by the function \(L_f(q) \equiv L_f(1, 0; q)\).
There is a natural correspondence between a sequence’s ordinary generating function (OGF), and its Lambert series generating function. Namely, if \(\widetilde{F}(q) := \sum\limits_{m \geq 1} f(m) q^m\) is the OGF of \(f\), then \[L_f(\alpha, \beta; q) = \sum\limits_{n \geq 1} \widetilde{F}(q^{\alpha n-\beta}).\]
We also have a so-called Lambert transform defined by [1, §2] \[F_a(x) := \int_0^{\infty} \frac{t a(t)}{e^{xt}-1} dt.\]
This transform satisfies an inversion relation of the form \[\tau a(\tau) = \lim_{k \rightarrow \infty} \frac{(-1)^{k+1}}{k!} \left(\frac{k}{\tau}\right)^{k+1} \sum\limits_{n \geq 1} \mu(n) n^k F_a^{(k)}\left(\frac{nk}{\tau}\right).\]
The interpretation of this invertible transform as a so-called Lambert transformation considers taking the mappings \(t a(t) \leftrightarrow a_n\) and \(e^{-x} \leftrightarrow q\).
Ramanujan discovered the following remarkable identities [1, §2]: \[ \sum\limits_{n \geq 1} \frac{(-1)^{n-1} q^n}{1-q^n} = \sum\limits_{n \geq 1} \frac{q^n}{1+q^n} \ \tag{1a}\] \[\sum\limits_{n \geq 1} \frac{n q^n}{1-q^n} = \sum\limits_{n \geq 1} \frac{q^n}{(1-q^n)^2} \ \tag{1b}\] \[\sum\limits_{n \geq 1} \frac{(-1)^{n-1} n q^n}{1-q^n} = \sum\limits_{n \geq 1} \frac{q^n}{(1+q^n)^2} \ \tag{1c}\] \[\sum\limits_{n \geq 1} \frac{q^n}{n(1-q^n)} = \sum\limits_{n \geq 1} \frac{q^n}{1+q^n} \ \tag{1d}\] \[\sum\limits_{n \geq 1} \frac{(-1)^{n-1} q^n}{n(1-q^n)} = \sum\limits_{n \geq 1} \log\left(\frac{1}{1-q^n}\right) \ \tag{1e}\] \[\sum\limits_{n \geq 1} \frac{\alpha^n q^n}{1-q^n} = \sum\limits_{n \geq 1} \log\left(1+q^n\right) \ \tag{1f}\] \[\sum\limits_{n \geq 1} \frac{n^2 q^n}{1-q^n} = \sum\limits_{n \geq 1} \frac{q^n}{(1-q^n)^2} \sum\limits_{k=1}^{n} \frac{1}{1-q^k}. \tag{1g}\]
It follows that we can relate the partition function generating functions \((q; \pm q)_{\infty}\) to the exponential of the two logarithmically termed series above (cf. the remarks in Section 7.4).
More generally, higher-order \(j^{th}\) derivatives for integers \(j \geq 1\) can be obtained by differentiating the Lambert series expansions termwise in the forms of [15, cf. Lemma 3] \[ q^j \cdot D_q^{(j)}\left[\frac{q^n}{1-q^n}\right] = \sum\limits_{m=0}^j \sum\limits_{k=0}^m {\genfrac{\lbrack}{\rbrack}{0pt}{}{j}{m}} {\genfrac{\lbrace}{\rbrace}{0pt}{}{m}{k}} \frac{(-1)^{j-k} k! n^m}{(1-q^n)^{k+1}}, \ \tag{2a}\] \[ = \sum\limits_{r=0}^j \left[\sum\limits_{m=0}^j \sum\limits_{k=0}^m {\genfrac{\lbrack}{\rbrack}{0pt}{}{j}{m}} {\genfrac{\lbrace}{\rbrace}{0pt}{}{m}{k}} \binom{j-k}{r} \frac{(-1)^{j-k-r} k! n^m}{(1-q^n)^{k+1}}\right] q^{(r+1)n}. \tag{2b}\]
Here, since we can express the coefficients for all finite \(n \geq 1\) as \[[q^n] L_f(q) = [q^n] \sum\limits_{m \leq n} \frac{f(m) q^m}{1-q^m},\] by partial sums of the generating functions, we need not worry about uniform convergence of the Lambert series generating function in \(q\).
By the binomial generating functions given by \([z^n] (1-z)^{m+1} = \binom{n+m}{m}\), we find that \[[q^n] \left(\sum\limits_{n \geq t} \frac{f(n) q^{mn}}{(1-q^n)^{k+1}}\right) = \sum\limits_{\substack{d|n \\ t \leq d \leq {\left\lfloor \frac{n}{m} \right\rfloor}}} \binom{\frac{n}{d} – m + k}{k} f(d),\] for positive integers \(m,t \geq 1\) and \(k \geq 0\).
We define the functions \(\widetilde{\Phi}_n(q)\) as the change of variable into the logarithmic derivatives of the cyclotomic polynomials as \[\begin{aligned} \widetilde{\Phi}_n(q) & = \frac{\Phi_n^{\prime}(1/q)}{q \cdot \Phi_n(1/q)} = \frac{1}{q} \frac{d}{dw}\left[\sum\limits_{d|n} \mu(n/d) \log(w^d-1)\right] \Biggr\rvert_{w=1/q} \\ & = \sum\limits_{d|n} \frac{d \mu(n/d)}{1-q^d}. \end{aligned}\]
We can express the component series terms for \(n \geq 1\) in the form of [16] \[\frac{1}{1-q^n} = \frac{1}{n} \sum\limits_{d|n} \widetilde{\Phi}_d(q).\]
Then we can express the Lambert series coefficients, \((f \ast 1)(n)\), in terms of the Ramanujan sums, \(c_q(n)\), for each positive natural number \(x \geq 1\) as \[[q^x] \sum\limits_{n \leq x} \frac{f(n)}{1-q^n} = \sum\limits_{d=1}^{x} c_d(x) \sum\limits_{n=1}^{ {\left\lfloor \frac{x}{d} \right\rfloor}} \frac{f(nd)}{nd} = \sum\limits_{n \leq x} \frac{f(n)}{n} \sum\limits_{d|n} c_d(x).\]
The first form of the factorization theorems considered in [14, 10] expands two variants of \(L_f(q)\) as \[\sum\limits_{n \geq 1} \frac{f(n) q^n}{1 \pm q^n} = \frac{1}{(\mp q; q)_{\infty}} \sum\limits_{n \geq 1} \left(s_o(n, k) \pm s_e(n, k)\right) f(k) q^n,\] where \(s_o(n, k) \pm s_e(n, k) = [q^n] (\mp q; q)_{\infty} \frac{q^k}{1 \pm q^k}\) is defined as the sum (difference) of the functions \(s_o(n, k)\) and \(s_e(n, k)\), which respectively denote the number of \(k\)’s in all partitions of \(n\) into and odd (even) number of distinct parts. If we define \(s_{n,k} = s_o(n, k) – s_e(n, k)\), then this sequence is lower triangular and invertible. Its inverse matrix is defined by [17, A133732] \[s_{n,k}^{-1} = \sum\limits_{d|n} p(d-k) \mu\left(\frac{n}{d}\right).\]
We can define the form of another factorization of \(L_f(q)\) where \(|C(q)| < \infty\) for all \(|q| < 1\) is such that \(C(0) \neq 0\) as \[\sum\limits_{n \geq 1} \frac{f(n) q^n}{1-q^n} = \frac{1}{C(q)} \sum\limits_{n \geq 1} \left(\sum\limits_{k=1}^n s_{n,k}(\gamma) \widetilde{f}(k)(\gamma)\right) q^n,\] for any prescribed non-zero arithmetic function \(\gamma(n)\) with \[\widetilde{f}(k)(\gamma) = \sum\limits_{d|k} \sum\limits_{r| \frac{k}{d}} f(d) \gamma(r).\]
In this case, we have that \[s_{n,k}^{-1}(\gamma) = \sum\limits_{d|n} [q^{d-k}] \frac{1}{C(q)} \gamma\left(\frac{n}{d}\right).\]
This notion of factorization can be generalized to expanding the generalized Lambert series \(L_f(\alpha, \beta; q)\) from the first subsection [11].
In either case, the coefficients generated by \(L_f(q)\) as \([q^n] L_f(q) = (f \ast 1)(n)\) and their summatory functions, \[\Sigma_f(x) := \sum\limits_{n \leq x} (f \ast 1)(n) = \sum\limits_{d \leq x} f(d) {\left\lfloor \frac{x}{d} \right\rfloor},\] inherit partition-function-like recurrence relations from the structure of the factorizations we have constructed. In particular, for \(n, x \geq 1\) we have that [14] \[\begin{aligned} (f \ast 1)(n+1) & = \sum\limits_{b = \pm 1} \sum\limits_{k=1}^{\left\lfloor \frac{\sqrt{24n+1}-b}{6}\right\rfloor} (-1)^{k+1} (f \ast 1)\left(n+1-\frac{k(3k+b)}{2}\right) + \sum\limits_{k=1}^{n+1} s_{n+1,k} f(k), \\ \Sigma_f(x+1) & = \sum\limits_{b = \pm 1} \sum\limits_{k=1}^{\left\lfloor \frac{\sqrt{24x+1}-b}{6}\right\rfloor} (-1)^{k+1} \Sigma_f\left(n+1-\frac{k(3k+b)}{2}\right) + \sum\limits_{n=0}^x \sum\limits_{k=1}^{n+1} s_{n+1,k} f(k). \end{aligned}\]
Most generally in [11], we define the generalized Lambert series factorizations which are parameterized by the lower triangular sequence on the right-hand-side of the next equation by the following series expansion for integers \(0 \leq \beta < \alpha\), \(C(q)\) any convergent OGF for \(|q| < 1\) such that \(C(0) \neq 0\), and \(\bar{f}\) a function depending on \(f\): \[\label{eqn_GenFactThmExp_def_v1} L_f(\alpha, \beta; q) := \sum\limits_{n \geq 1} \frac{f(n) q^{\alpha n-\beta}}{1-q^{\alpha n-\beta}} = \frac{1}{C(q)} \sum\limits_{n \geq 1} \left(\sum\limits_{k=1}^{n} \bar{s}_{n,k}(\alpha, \beta) \bar{f}(k)\right) q^{n}; |q| < 1. \tag{3}\]
The lower triangular sequence, \(\bar{s}_{n,k}(\alpha, \beta)\), in the expansion above is invertible and depends on the parameters \((\alpha, \beta, f, C(q))\) that define this Lambert series expansion. Alternately, for \(|q|<1\) and integers \(0\leq \beta<\alpha\), we have that \[\begin{aligned} \sum\limits_{n=1}^{\infty} a_n \frac{q^{\alpha n-\beta}}{1-q^{\alpha n-\beta}} = \frac{1}{(q^{\alpha-\beta};q^\alpha)_\infty} \sum\limits_{n=1}^{\infty} \left( \sum\limits_{k=1}^n (s_o(n,k)-s_e(n,k)) a_k\right) q^n, \end{aligned}\] where \(s_o(n,k)\) and \(s_e(n,k)\) denote the number of \((\alpha k-\beta)\)’s in all partitions of \(n\) into an odd (respectively even) number of distinct parts of the form \(\alpha k-\beta\). Similarly, for \(|q|<1\), \(0\leq \beta<\alpha\), we can expand \[\begin{aligned} \sum\limits_{n=1}^{\infty} a_n \frac{q^{\alpha n-\beta}}{1-q^{\alpha n-\beta}} = (q^{\alpha-\beta};q^\alpha)_\infty \sum\limits_{n=1}^{\infty} \left( \sum\limits_{k=1}^n s(n,k) a_k\right) q^n, \end{aligned}\] where \(s(n,k)\) denotes the number of \((\alpha k-\beta)\)’s in all partitions of \(n\) into parts of the form \(\alpha k-\beta\). Moreover, for any fixed arithmetic function \(f\), if we define the arithmetic functions \(\gamma(n)\) and \(\widetilde{\gamma}(n) := \sum\limits_{d|n} \gamma(d)\) that depend on a fixed factorization pair \((C(q), \bar{s}_{n,k})\) in (3) such that \[\begin{aligned} \bar{s}_{n,k}^{(-1)} & := \sum\limits_{d|n} [q^{d-k}] \frac{1}{C(q)} \cdot \gamma(n/d), \end{aligned}\] then we have that the sequence of \(\bar{f}(n)\) is given by the following formula for all \(n \geq 1\): \[\begin{aligned} \bar{f}(n) & = \sum\limits_{\substack{d|n \\ d \equiv \beta \bmod \alpha}} f\left(\frac{d-\beta}{\alpha}\right) \widetilde{\gamma}\left(\frac{n}{d}\right). \end{aligned}\]
We have the following well-known “classical” examples of Lambert series identities [13, §27.7] [8, §17.10] [3, §11]: \[ \label{eqn_WellKnown_LamberSeries_Examples} \sum\limits_{n \geq 1} \frac{\mu(n) q^n}{1-q^n} = q, \ \tag{4a}\] \[\label{eqn_WellKnown_LamberSeries_Examples_phi} \sum\limits_{n \geq 1} \frac{\phi(n) q^n}{1-q^n} = \frac{q}{(1-q)^2}, \ \tag{4b}\] \[\sum\limits_{n \geq 1} \frac{n^{\alpha} q^n}{1-q^n} = \sum\limits_{m \geq 1} \sigma_{\alpha}(n) q^n, \ \tag{4c}\] \[\sum\limits_{n \geq 1} \frac{\lambda(n) q^n}{1-q^n} = \sum\limits_{m \geq 1} q^{m^2}, \ \tag{4d}\] \[\sum\limits_{n \geq 1} \frac{\Lambda(n) q^n}{1-q^n} = \sum\limits_{m \geq 1} \log(m) q^m, \ \tag{4e}\] \[\sum\limits_{n \geq 1} \frac{|\mu(n)| q^n}{1-q^n} = \sum\limits_{m \geq 1} 2^{\omega(m)} q^m, \ \tag{4f}\] \[\sum\limits_{n \geq 1} \frac{J_t(n) q^n}{1-q^n} = \sum\limits_{m \geq 1} m^t q^m, \ \tag{4g}\] \[\sum\limits_{n \geq 1} \frac{\mu(\alpha n) q^n}{1-q^n} = – \sum\limits_{n \geq 0} q^{\alpha^n}, \alpha \in \mathbb{P} \ \tag{4h}\] \[\sum\limits_{n \geq 1} \frac{q^n}{1-q^n} = \frac{\psi_q(1) + \log(1-q)}{\log(q)}, \ \tag{4i}\] \[\sum\limits_{n \geq 1} \frac{\operatorname{lsb}(n) q^n}{1-q^n} = \frac{\psi_{q^2}(1/2) + \log(1-q^2)}{2 \log(q)}. \tag{4j}\]
For any arithmetic function \(f\) and integers \(k \geq 1\), we have that \[\begin{aligned} \sum\limits_{n \geq 1} \frac{f(n) q^{n^k}}{1-q^{n^k}} & = \sum\limits_{m \geq 1} \left(\sum\limits_{d^k | n} f(d)\right) q^m. \end{aligned} \tag{5}\]
This follows from the uniform expansion in the last equation as \[\begin{aligned} \sum\limits_{n \geq 1} \sum\limits_{m \geq 1} f(n) q^{m n^k}. \end{aligned}\]
The integers \(r\) in the series expansion of the last equation such that we have \(f(r)\) as a coefficient of \(q^p\) correspond to the divisors \(r\) of \(p = m \cdot n^k\).
For example, we have that \[\sum\limits_{n \geq 1} \frac{\lambda_k(n) q^n}{1-q^n} = \sum\limits_{m \geq 1} q^{m^k} \ \tag{6a}\] \[\sum\limits_{n \geq 1} |\mu_k(n)| q^n = q^{k+1} \ \tag{6b}\] \[\sum\limits_{n \geq 1} \frac{\mu(n) q^{n^2}}{1-q^{n^2}} = \sum\limits_{m \geq 1} |\mu(m)| q^m. \tag{6c}\]
For \(|q| < 1\) and \(f\) any arithmetic function, let \[\widehat{L}_f(q) := \sum\limits_{n \geq 1} \frac{f(n) q^n}{1+q^n}.\]
We can write \(\widehat{L}_f(q) \equiv L_h(q)\), e.g., as an ordinary Lambert series expansion, where \[h(n) = \begin{cases} h(n), & \text{ if $n$ is odd; } \\ h(n) – 2h\left(\frac{n}{2}\right), & \text{ if $n$ is even. } \end{cases} \]
Thus we have that \[\label{eqn_} \widehat{L}_f(q) = L_f(q) – 2L_f(q^2). \tag{7}\]
The two primary Lambert series expansions from the previous section that admit “nice”, algebraic closed-form expressions are translated below: \[ \sum\limits_{n \geq 1} \frac{\mu(n) q^n}{1+q^n} = q-2q^2 \ \tag{8a}\] \[\sum\limits_{n \geq 1} \frac{\phi(n) q^n}{1+q^n} = \frac{q(q+q^2)}{(1-q^2)^2}. \tag{8b}\]
Note that Section 6.2 also provides a pair of related series in the context of GCD sums of an arithmetic function.
From [8, §17.10], we obtain that \[\sum\limits_{n \geq 1} \frac{4 \cdot (-1)^{n+1} q^{2n+1}}{1-q^{2n+1}} = \sum\limits_{m \geq 1} r_2(m) q^m, |q| < 1. \tag{9}\]
Definition 5.1 (Jacobi theta functions).For complex-valued \(q, z\), we define the next four variants of the Jacobi theta functions by the following bilateral series: \[\begin{aligned} \vartheta_1(z, q) & := \sum\limits_{n=-\infty}^{\infty} (-1)^{n+1/2} q^{(n+1/2)^2} e^{(2n+1)\imath z}, \\ \vartheta_2(z, q) & := \sum\limits_{n=-\infty}^{\infty} q^{(n+1/2)^2} e^{(2n+1)\imath z}, \\ \vartheta_3(z, q) & := \sum\limits_{n=-\infty}^{\infty} q^{n^2} e^{2n \imath z}, \\ \vartheta_4(z, q) & := \sum\limits_{n=-\infty}^{\infty} (-1)^{n} q^{n^2} e^{2n \imath z}. \end{aligned}\]
There are a number of classical theta function related series of the following forms [13, §20]: \[ \sum\limits_{n \geq 1} \frac{q^n}{1+q^{2n}} = \frac{1}{4}\left[\vartheta_3^2(q) – 1\right] \ \tag{10a}\] \[\sum\limits_{n \geq 1} \frac{q^{2n+1}}{1+q^{4n+2}} = \frac{1}{4}\left[\vartheta_3^2(q) – \vartheta_2^2(q)\right] = \frac{\vartheta_2^2(q^2)}{4} \ \tag{10b}\] \[\sum\limits_{n \geq 1} \frac{q^n}{1-q^{2n}} = L_1(q) – L_1(q^2) \ \tag{10c}\] \[\sum\limits_{n \geq 1} \frac{q^{2n+1}}{1-q^{4n+2}} = L_1(q) – 2L_1(q^2) + L_1(q^4) \ \tag{10d}\] \[\sum\limits_{n \geq 1} \frac{4 \sin(2nz) q^{2n}}{1-q^{2n}} = \frac{\vartheta_1^{\prime}(z, q)}{\vartheta_1(z, q)} \ \tag{10e}\] \[\sum\limits_{n \geq 1} \frac{4 (-1)^n \sin(2nz) q^{2n}}{1-q^{2n}} = \frac{\vartheta_2^{\prime}(z, q)}{\vartheta_2(z, q)} \ \tag{10f}\] \[\sum\limits_{n \geq 1} \frac{4 (-1)^n \sin(2nz) q^{n}}{1-q^{2n}} = \frac{\vartheta_3^{\prime}(z, q)}{\vartheta_3(z, q)} \ \tag{10g}\] \[\sum\limits_{n \geq 1} \frac{4 \sin(2nz) q^{n}}{1-q^{2n}} = \frac{\vartheta_4^{\prime}(z, q)}{\vartheta_4(z, q)} \ \tag{10h}\] \[\sum\limits_{n=-\infty}^{\infty} \frac{(-1)^n e^{2\imath nz} q^{n^2}}{q^{-n} e^{-\imath z} + q^n e^{\imath z}} = \frac{\vartheta_2(0, q) \vartheta_3(z, q) \vartheta_4(z, q)}{\vartheta_2(z, q)}. \tag{10i}\]
There are a number of Lambert, and Lambert-like series, for mock theta functions of order \(6\) given in [1, §8]. These series expansions are cited as follows where \(J_{a,m} := (q^a, q^{m-a}, q^m; q^m)_{\infty}\): \[\label{eqn_MockThetaSixthOrder_idents} \phi_{\mathop{\mathrm{mock}}}(q) = \sum\limits_{n \geq 0} \frac{(-1)^n q^{n^2} (q; q^2)_n}{(-q)_{2n}} = \frac{2}{J_{1,3}} \sum\limits_{r=-\infty}^{\infty} \frac{q^{r(3r+1)/2}}{1+q^{3r}} \ \tag{11a}\] \[\Psi_{\mathop{\mathrm{mock}}}(q) = \sum\limits_{n \geq 0} \frac{(-1)^n q^{(n+1)^2} (q; q^2)_n}{(-q)_{2n+1}} = \frac{2}{J_{1,3}} \sum\limits_{r=-\infty}^{\infty} \frac{q^{r(3r+1)/2}}{1+q^{3r+1}} \ \tag{11b}\] \[\rho_{\mathop{\mathrm{mock}}}(q) = \sum\limits_{n \geq 0} \frac{q^{n(n+1)/2} (-q)_n}{(q; q^2)_{n+1}} = \frac{1}{J_{1,6}} \sum\limits_{r=-\infty}^{\infty} \frac{(-1)^r q^{r(3r+4)}}{1-q^{6r+1}} \ \tag{11c}\] \[\sigma_{\mathop{\mathrm{mock}}}(q) = \sum\limits_{n \geq 0} \frac{q^{n(n+2)/2} (-q)_n}{(q; q^2)_{n+1}} = \frac{1}{J_{1,6}} \sum\limits_{r=-\infty}^{\infty} \frac{(-1)^r q^{(r+1)(3r+1)}}{1-q^{6r+3}} \ \tag{11d}\] \[\gamma_{\mathop{\mathrm{mock}}}(q) = \sum\limits_{n \geq 0} \frac{q^{n^2} (q)_n}{(q^3; q^3)_{n}} = \frac{1}{(q; q)_{\infty}} \sum\limits_{r=-\infty}^{\infty} \frac{(-1)^r q^{r(3r+1)/2}}{1+q^r+q^{2r}}. \tag{11e}\]
Given two prescribed arithmetic functions \(f\) and \(g\) we define their Dirichlet convolution, denoted by \(h = f \ast g\), to be the function \[\begin{aligned} (f \ast g)(n) & := \sum\limits_{d|n} f(d) g\left(\frac{n}{d}\right), \end{aligned}\] for all natural numbers \(n \geq 1\) [3, §2.6]. The classical Möbius inversion result is stated in terms of convolutions as follows, where \(\mu\) is the Möbius function: \(h = f \ast 1\) if and only if \(f = h \ast \mu\). There is a natural connection between the coefficients of the Lambert series of an arithmetic function \(a_n\) and its corresponding Dirichlet generating function, \(\mathop{\mathrm{DGF}}(a_n; s) := \sum\limits_{n \geq 1} a_n / n^s\). Namely, we have that for any \(s \in \mathbb{C}\) such that \(\Re(s) > 1\) \[b_n = [q^n] \sum\limits_{n \geq 1} \frac{a_n q^n}{1-q^n} \quad\text{ if and only if }\quad \mathop{\mathrm{DGF}}(b_n; s) = \mathop{\mathrm{DGF}}(a_n; s) \zeta(s),\] where \(\zeta(s)\) is the Riemann zeta function. Moreover, we can further connect the coefficients of the Lambert series over a convolution of arithmetic functions to its associated Dirichlet series by noting that \(\mathop{\mathrm{DGF}}(f \ast g; s) = \mathop{\mathrm{DGF}}(f; s) \cdot \mathop{\mathrm{DGF}}(g; s)\).
Notation 6.1(Expanding Dirichlet inverse functions).The Dirichlet inverse function of \(f(n)\), denoted \(f^{-1}(n)\), is an arithmetic function such that \((f \ast f^{-1})(n) = \delta_{n,1}\) for all \(n \geq 1\). The function \(f^{-1}\) exists and is unique if and only if \(f(1) \neq 0\). In these cases, we can expand the inverse function in terms of weighted terms in \(f\) recursively according to the formula \[f^{-1}(n) = \begin{cases} \frac{1}{f(1)}, & n = 1; \\ -\frac{1}{f(1)} \times \sum\limits_{\substack{d|n \\ d>1}} f(d) f^{-1}\left(\frac{n}{d}\right), & n \geq 2. \end{cases}\]
We have that [12] \[f^{-1}(n) = \sum\limits_{j=1}^{\Omega(n)} \frac{(-1)^j \cdot (f-f(1)\varepsilon)_{\ast_j}(n)}{f(1)^{j+1}}.\]
Note that Section 7 contains a formula enumerating the Dirichlet inverse of any Dirichlet invertible arithmetic function \(f\).
We can see that the Lambert series over the convolution \((f \ast g)(n)\) is given by the double sum \[L_{f \ast g}(q) = \sum\limits_{n \geq 1} f(n) L_g(q^n), |q| < 1.\]
Similarly, \[\widehat{L}_{f \ast g}(q) = \sum\limits_{n \geq 1} f(n) \left[L_g(q^n)-2L_g(q^{2n})\right].\]
Clearly we have by Möbius inversion that the ordinary generating function (OGF) of \(f\) is given by \[L_{f \ast \mu}(q) = \sum\limits_{n \geq 1} f(n) q^n.\]
If \(F(x) := \sum\limits_{n \leq x} f(n)\) is the summatory function of \(f\), then we have that \[\sum\limits_{n \geq 1} F(n) q^n = \sum\limits_{n \geq 1} \mu(n) \frac{L_f(q^n)}{1-q}.\]
Proof. The last identity follows by writing \[\begin{aligned} \frac{L_f(q)}{1-q} & = \sum\limits_{k \leq n} (f \ast 1)(k) \\ & = \sum\limits_{k=1}^n F(k) \sum\limits_{r= {\left\lfloor \frac{n}{k+1} \right\rfloor}+1}^{ {\left\lfloor \frac{n}{k} \right\rfloor}} 1 \\ \implies [q^n] L_f(q) & = \sum\limits_{m|n} \frac{n}{m} \times (F(m)-F(m-1)). \end{aligned}\]
Thus it follows that since \(\operatorname{Id}_k^{-1}(n) = \mu(n) \operatorname{Id}_k(n) = \mu(n) n^{k}\) as in [3, cf. §2], we get that \[\frac{L_{f \ast \operatorname{Id}_1^{-1}}(q)}{1-q} = \sum\limits_{n \geq 1} \mu(n) \frac{L_f(q^n)}{1-q} = \sum\limits_{n \geq 1} F(n) q^n. \] ◻
We have the following convolution identities for Lambert series expansions of special functions [7, §7.4] [13, §24.4 (iii)]: \[ \sum\limits_{n \geq 1} \frac{\psi_k(n) q^n}{1-q^n} = \sum\limits_{j=0}^{k} {\genfrac{\lbrace}{\rbrace}{0pt}{}{k}{j}} j! \times \sum\limits_{m \geq 1} 2^{\omega(m)} \frac{q^{mj}}{(1-q^m)^{j+1}} \ \tag{12a}\] \[= \sum\limits_{j=0}^{k} {\genfrac{\lbrace}{\rbrace}{0pt}{}{k}{j}} j! \times \sum\limits_{n \geq 1} \sum\limits_{d|\lfloor n/j\rfloor} 2^{\omega(d)} \binom{ {\left\lfloor \frac{n}{j} \right\rfloor} \frac{1}{d} + j}{j} \cdot q^n; m \in \mathbb{N}, \ \] \[\sum\limits_{n \geq 1} \frac{(\sigma_k \ast \mu)(n) q^n}{1-q^n} = \sum\limits_{j=0}^{k} {\genfrac{\lbrace}{\rbrace}{0pt}{}{k}{j}} \frac{j! q^j}{(1-q)^{j+1}}; m \in \mathbb{N}; \sigma_k \ast \mu = \operatorname{Id}_k, \ \tag{12b}\] \[\sum\limits_{n \geq 1} \frac{\sigma_1(n) q^n}{1-q^n} = \sum\limits_{n \geq 1} \frac{d(n) q^n}{(1-q^n)^2}; \sigma_1 = \phi \ast \sigma_0, \ \tag{12c}\] \[\sum\limits_{n \geq 1} \frac{(\phi_k \ast \operatorname{Id}_k)(n) q^n}{1-q^n} = \sum\limits_{m \geq 1} \frac{1}{k+1} \times \left(B_{k+1}(m+1) – B_{k+1}(0)\right) q^m. \tag{12d}\] We also have some unique generating function expressions for common summatory functions, including the following identity: \begin{equation} \sum\limits_{n \geq 1} \mu(n) \frac{L_{\mu \ast \omega}(q^n)}{1-q} = \sum\limits_{x \geq 1} \pi(x) q^x. \end{equation}
The argument used to arrive at the last identity shows that if \(A \subseteq \mathbb{Z}^{+}\) and its indicator function is denoted by \(\chi_A(n)\), then we have that \begin{equation} \sum\limits_{n \geq 1} \mu(n) L_{\chi_A}(q^n) = \sum\limits_{a \in A} q^a. \end{equation} For example, if \(\mathbb{N}_{\operatorname{sqfree}}\) denotes the set of positive squarefree integers, then \begin{equation} \sum\limits_{n \geq 1} \mu(n) L_{\mu^2}(q^n) = \sum\limits_{k \in \mathbb{N}_{\operatorname{sqfree}}} q^k. \end{equation} Moroever, if \(\chi_A(n) = (\mu \ast g_A)(n)\), then \begin{equation} \sum\limits_{n \geq 1} \frac{g_A(n) f(n) q^n}{1-q^n} = \sum\limits_{a \in A} L_f(q^a). \end{equation} For example, in Eq. (20) of the next section, we prove a prime summation identity for the Lambert series over the pointwise products of \(\omega(n) f(n)\) and \(\lambda(n) f(n)\) for any arithmetic \(f\).
We denote by \(f_{\ast_j}(n)\) the \(j\)-fold convolution of \(f\) with itself, i.e., the sequence defined recursively by \[f_{\ast_j}(n) = \begin{cases} \delta_{n,1}, & \text{ if $j=0$; } \\ \sum\limits_{d|n} f(d) f_{\ast_{(j-1)}}\left(\frac{n}{d}\right), & \text{ if $j \geq 1$. } \end{cases}\]
Then as in [12], we have that \[f^{-1}(n) = \sum\limits_{j=1}^{\Omega(n)} \binom{\Omega(n)}{j} \frac{(-1)^j}{f(1)^{j+1}} f_{\ast_j}(n).\]
Hence, we have that \[\begin{aligned} \sum\limits_{n \geq 1} \frac{f^{-1}(n) q^n}{1-q^n} = \sum\limits_{n \geq 1} \left(1-\frac{f(n)}{f(1)}\right)^{\Omega(n)} \times \frac{L_f(q^n)}{f(1)f(n)} – \sum\limits_{n \geq 1} \frac{L_f(q^n)}{f(1)f(n)}. \end{aligned} \tag{15}\]
We have that \[ \label{eqn_GCDTransGenIdents_v1} \sum\limits_{n \geq 1} \left(\sum\limits_{\substack{1 \leq d \leq n \ (d, n)=1}} f(d)\right) \frac{q^n}{1-q^n} = \sum\limits_{k \geq 1} \left(\sum\limits_{d|k} \frac{\mu(d)}{1-q^d}\right) f(k) q^k \ \tag{16a}\] \[\label{eqn_GCDTransGenIdents_v2} \sum\limits_{n \geq 1} \left(\sum\limits_{\substack{1 \leq d \leq n \\ (d, k)=m}} f(d)\right) \frac{q^n}{1-q^n} = \sum\limits_{k \geq 1} \left(\sum\limits_{d|k} \frac{\mu(d)}{1-q^{md}}\right) f(k) q^k \ \tag{16b}\] \[\label{eqn_GCDTransGenIdents_v3} \sum\limits_{n \geq 1} \left(\sum\limits_{d=1}^{n} f(\gcd(d, n))\right) \frac{q^n}{1-q^n} = \sum\limits_{n \geq 1} \frac{(f \ast \phi)(n) q^n}{1-q^n} \ \tag{16c}\] \[= \sum\limits_{n \geq 1} f(n) \frac{q^n}{(1-q^n)^2} \ \] \[= \sum\limits_{n \geq 1} \sum\limits_{k=1}^n (f \ast 1)(\gcd(k, n)) q^n. \]
The identities in (16a) and (16b) result from the following equation for fixed integers \(k \geq 1\) and \(1 \leq m \leq k\) [12, §3.2]: \[\sum\limits_{n \geq k} {\left[(n, k) = m\right]_{\delta}} q^n = \sum\limits_{d|k} \frac{q^k \mu(d)}{1 – q^{md}}.\]
The results in (16c) are respectively consequences of the following equation, (4b) and the Dirichlet convolution identity that \((\phi \ast 1)(n) = n\) for all \(n \geq 1\) [18] [13, §27.5]: \[\sum\limits_{1 \leq k \leq m} h(\gcd(k, m)) = (h \ast \phi)(m), m \geq 1.\]
In [18], formulas for the discrete Fourier transform of a function evaluated at a \(\gcd\) argument are derived. The reference also connects Lambert series expansions of Liouville for the divisor sum functions \(\phi_a(n)\) (non-standard notation) that generalize the classical Euler totient function as \[ \sum\limits_{n \geq 1} \left(\sum\limits_{d|(a,n)} d\cdot \phi\left(\frac{n}{d}\right)\right) \frac{q^n}{1-q^n} = \frac{\sum\limits_{k=1}^{2a} (a-|k-a|) d(\gcd(a-|k-a|, a)) q^k}{(1-q^a)^2} \ \tag{17a}\] \[\sum\limits_{n \geq 1} \left(\sum\limits_{d|(a,n)} d\cdot \phi\left(\frac{n}{d}\right)\right) \frac{q^n}{1+q^n} = \frac{p[a](q)}{(1-q^{2a})^2}, \ \tag{17b}\] where \[\begin{align*} p[a](q) := \sum\limits_{k=1}^{4a} &[(2a-|k-2a|) d(\gcd(2a-|k-2a|, a))\\ &- {\left[k \text{\ even}\right]_{\delta}} \left(a-|k/2-a|\right) d(\gcd(a-|k/2-a|, a))] q^k. \end{align*}\]
There are related LCM Dirichlet series, or DGF, identities that we can cite to find a Lambert series expansion for these functions from [6]: \[ \sum\limits_{n \geq 1} \left(\sum\limits_{k=1}^{n} [k,n]\right) \frac{q^n}{1-q^n} \notag\\ = \sum\limits_{m \geq 1} \frac{1}{2} \left(\sigma_1(m) + \sum\limits_{d|m} \sum\limits_{r|\frac{m}{d}} d \sigma_2(d) \mu\left(\frac{m}{dr}\right) \left(\frac{m}{dr}\right)^2\right) q^m, \ \tag{18a}\] \[\sum\limits_{n \geq 1} \left(\sum\limits_{k=1}^{n} [k,n]^m\right) \frac{q^n}{1-q^n} \notag\\ = \sum\limits_{n \geq 1} \left( \sigma_m(n) + \sum\limits_{i=1}^{m+1} \binom{m+1}{i} \frac{B_{m+1-i}}{m+1} \left(1 \ast \operatorname{Id}_m \ast \operatorname{Id}_{m+i} \ast \operatorname{Id}_{2m}^{-1}\right)(n)\right) q^m. \ \tag{18b}\] In particular, we learn from [6, pages D-19, D-71] that the first Lambert series above is generated as \(L_{f_1}(q)\) when \(f_1 = \frac{1}{2}\left(\operatorname{Id}_1 \ast \operatorname{Id}_2^{-1} \cdot (\operatorname{Id}_2+\operatorname{Id}_3)\right)\), and the second (LCM powers sum) series is generated as \(L_{f_2}(q)\) with \[f_2 = \operatorname{Id}_m + \sum\limits_{i=1}^{m+1} \binom{m+1}{i} \frac{B_{m+1-i}}{m+1} \left( \operatorname{Id}_m \ast \operatorname{Id}_{m+i} \ast \operatorname{Id}_{2m}^{-1}\right).\]
We consider the Lambert series generating functions over the sums [12] \[S_{1,m}(f, g; n) := \sum\limits_{d|(m,n)} f(d) g\left(\frac{m}{d}\right).\] We have that \[\begin{aligned} \notag \widetilde{L}_{1,m}(f, g; q) & := \sum\limits_{n \geq 1} \frac{S_{1,m}(f, g; n) q^n}{1-q^n} \\ \label{eqn_ApostolSumsIdent_PrimaryFormula_v1} & \phantom{:}= \sum\limits_{n \geq 1} (f \ast g \ast 1)(\gcd(m, n)) q^n. \end{aligned} \tag{19}\]
Proof of (19). We prove the following for integers \(n \geq 1\): \[\begin{aligned} \sum\limits_{d|n} \sum\limits_{r|(m,d)} f(r) g\left(\frac{m}{r}\right) & = \sum\limits_{\substack{s|m \\ s|d|n}} \sum\limits_{r|s} f(r) g\left(\frac{s}{r}\right) \\ & = \sum\limits_{s|(m,n)} (f \ast g)(s). \end{aligned}\] The key transition step in the above equations is in noting that \((d, m)\) is a divisor of both \(d\) and \(m\) for any integers \(d,m \geq 1\). ◻
The primary special case of interest with these types of sums is the Ramanujan sum, \(c_q(x) \equiv S_{1,x}(\operatorname{Id}_1, \mu; q)\). In particular, as expanded in [18], we know that \[c_q(x) = \sum\limits_{d|(q, x)} d \mu\left(\frac{k}{d}\right), \text{ for\ integers\ } q, x \geq 1.\]
These sums are periodic modulo \(m \geq 1\) and have a finite Fourier series expansion with known coefficients. Let \[a_k(f, g; m) = \sum\limits_{d|(m,k)} g(d) f\left(\frac{k}{d}\right) \cdot \frac{d}{k}.\]
Then we have that [13, §27.10] \[S_{1,m}(f, g; n) = \sum\limits_{k=1}^m a_m(f, g; m) \cdot e^{2\pi\imath \cdot kn/m}.\]
We next consider the Lambert series generating functions over the sums \[S_{2,m}(f, g; n) := \sum\limits_{d|(m,n)} f(d) g\left(\frac{mn}{d^2}\right).\]
As an example of an identity involving this summation type, we have that the Ramanujan tau function, \(\tau(n)\), satisfies \[\tau(m) \tau(n) = \sum\limits_{d|(m, n)} d^{11} \tau\left(\frac{mn}{d^2}\right).\]
Additionally, as another example, for any \(\alpha \in \mathbb{C}\) and \(m, n \geq 1\), \[\sigma_{\alpha}(m) \sigma_{\alpha}(n) = \sum\limits_{d|(m,n)} d^{\alpha} \sigma_{\alpha}\left(\frac{mn}{d^2}\right).\]
Note that if \(g\) is completely multiplicative, then [3, §2, Exercise 31] \[f(m) f(n) = \sum\limits_{d|(m, n)} g(d) f\left(\frac{mn}{d^2}\right).\]
We have by Mobius inversion and our previous identities on Dirichlet convolutions that: \[ \sum\limits_{n \geq 1} \frac{\omega(n) f(n) q^n}{1-q^n} = \sum\limits_{p\text{\ prime}} L_f(q^p) \ \tag{20a}\] \[ \sum\limits_{n \geq 1} \frac{\lambda(n) f(n) q^n}{1-q^n} = \sum\limits_{d \geq 1} \sum\limits_{n \geq 1} \frac{\mu(n) f(nd^2) q^{nd^2}}{1-q^{nd^2}}. \tag{20b}\]
Proof. These two equations follow from (14) by noting that the characteristic function of the primes is given by \(\chi_{\mathbb{P}} = \omega \ast \mu\) and that the characteristic function of the squares is given by \(\chi_{\operatorname{sq}} = \lambda \ast \mu\). ◻
Suppose that \(f\) is multiplicative such that \(f(p) \neq +1, -1\), respectively, for all primes \(p\). Then we have that[9] \[ \sum\limits_{d|n} \mu(d) \omega(d) f(d) = \prod_{p|n} (1-f(p)) \times \sum\limits_{p|n} \frac{f(p)}{f(p)-1} \ \tag{21a}\] \[\sum\limits_{d|n} |\mu(d)| \omega(d) f(d) = \prod_{p|n} (1+f(p)) \times \sum\limits_{p|n} \frac{f(p)}{1+f(p)} \tag{21b}\] Under the same respective conditions, suppose that \(f\) is indeed completely multiplicative. Then similarly, we obtain that \[ \sum\limits_{d|n} \mu(d) \omega(d) f(d) = \sum\limits_{d|n} \mu(d) f(d) \times \sum\limits_{p|n} \frac{f(p)}{f(p)-1} \ \tag{22a}\] \[\sum\limits_{d|n} |\mu(d)| \omega(d) f(d) = \sum\limits_{d|n} |\mu(d)| f(d) \times \sum\limits_{p|n} \frac{f(p)}{1+f(p)} \ \tag{22b}\]
We have the following prime sum related divisor sum identities in the form of \(f \ast 1\) generated by a Lambert series generating function over a multiplicative \(f\) [5]: \[ \sum\limits_{d|n} \frac{\mu(d) \log d}{d} = \frac{\phi(n)}{n} \sum\limits_{p|n} \frac{\log p}{1-p}, \ \tag{23a}\] \[\sum\limits_{d|n} \frac{|\mu(d)| \log d}{d^k} = \frac{\Psi_k(n)}{n^k} \sum\limits_{p | n} \frac{\log p}{p^{k}+1}, \ \tag{23b}\] \[\sum\limits_{d|n} \frac{|\mu(d)| \log d}{\phi(d)} = \frac{n}{\phi(n)} \sum\limits_{p|n} \frac{\log p}{p}, \ \tag{23c}\] \[\sum\limits_{d|n} \frac{\mu(d) \log d}{\sigma_0(d)} = -2^{\omega(n)} \log \gamma(n), \ \tag{23d}\] \[\sum\limits_{d|n} \mu(d)^{a} d_k(d) \log d = (1+(-1)^a k)^{\omega(n)} \times \frac{k \log \gamma(n)}{k + (-1)^a}; a \in \{1,2\}, k \geq 2, \ \tag{23e}\] \[\sum\limits_{d|n} \mu(d) \sigma_1(d) \log d = (-1)^{\omega(n)} \gamma(n) \left( \log \gamma(n) + \sum\limits_{p|n} \frac{\log p}{p}\right), \ \tag{23f}\] \[\sum\limits_{d|n} \mu(d)^{a} f(d) \log d = \prod_{p|n} (1+(-1)^{a} f(p)) \times \sum\limits_{p|n} \frac{f(p) \log p}{f(p)+(-1)^{a}}; a \in \{1,2\}, \ \tag{23g}\] \[\sum\limits_{d|n} |\mu(d)| k^{\omega(d)} = (k+1)^{\omega(n)}. \ \tag{23h}\]
We do not focus on connections of other forms of generalized Lambert series expansions to \(q\)-series and partition generating functions, nor consider their representations in the context of modular forms. In this sense, we note that one can consider a class of generalized Lambert series defined by \[L(\alpha; t, q) := \sum\limits_{n \geq 1} \frac{t^n}{1-x q^n},\] and then connect variants of this function to \(q\)-series (see, for example, the identities given in (11)). For an overview of that vast material, we refer the reader to a subset of relevant references in [1, 2, 4].