É. Ghys proved that the linking numbers of modular knots and the "missing" trefoil K 2,3 in S 3 coincide with the values of a highly ubiquitous function called the Rademacher symbol for SL 2 Z. In this paper, we replace SL 2 Z = Γ 2,3 by the triangle group Γ p,q for any coprime pair (p, q) of integers with 2 p < q. We invoke the theory of harmonic Maass forms for Γ p,q to introduce the notion of the Rademacher symbol ψ p,q , and provide several characterizations. Among other things, we generalize Ghys's theorem for modular knots around any "missing" torus knot K p,q in S 3 and in a lens space. Contents 1 Introduction 2 2 Harmonic Maass forms for triangle groups 5 2.