We show that MacMahon’s sum-of-divisors q-series \(A_k(q)\) and \(C_k(q)\) arise naturally as the coefficients in the expansions of Gosper’s q-trigonometric functions. In particular, we express \(\sin _q(\pi z)\) and \(\cos _q(\pi z)\) in terms of MacMahon’s functions and use Gosper’s q-trigonometric identities to derive new convolution formulas for \(A_k(q)\) and \(C_k(q)\) . As an application, we obtain well-known modular identities relating the Eisenstein series \(E_2\) and certain \(\eta \) -products.