AbstractIt is a well-known fact that the function fQ(τ)=∑n=0∞P(nQ+l)exp2πiτn+24l−124Q has the behavior of a modular function of level (“Stufe”) Q and dimension 12, if Q is an integrr and l satisfies the condition 24l ≡ 1 (Q) and 0 ≤ l < Q. In paper we show that these conditions are also necessary.Furthermore, the zeros and poles (including main parts) in all rational points are determined. Several applications are given. For q = 5, 7 or 13 we get well-known results with very simple proof. For q = 17 we get a new identity, and a congruence relation between the number of partitions of partitions and the number of representations of quaternary quadratic forms of discriminant 17 and 173, respectively