We build on and generalize recent work on so-termed factorization theorems for Lambert series generating functions. These factorization theorems allow us to express formal generating functions for special sums as invertible matrix transformations involving partition functions. In the Lambert series case, the generating functions at hand enumerate the divisor sum coefficients of $$q^n$$ as $$\sum _{d|n} f(d)$$ for some arithmetic function f. Our new factorization theorems provide analogs to these established expansions generating corresponding sums of the form $$\sum _{d: (d,n)=1} f(d)$$ (type I sums) and the Anderson–Apostol sums $$\sum _{d|(m,n)} f(d) g(n/d)$$ (type II sums) for any arithmetic functions f and g. Our treatment of the type II sums includes a matrix-based factorization method relating the partition function p(n) to arbitrary arithmetic functions f. We conclude the last section of the article by directly expanding new formulas for an arithmetic function g by the type II sums using discrete, and discrete time, Fourier transforms (DFT and DTFT) for functions over inputs of greatest common divisors.