Globular clusters display an anti-correlation between the fraction of the first generation of stars (N(G1)/N(tot)) and the slope of the present-day mass function of the clusters (α pd ), which is particularly significant for massive clusters. In the framework of the binarymediated collision scenario for the formation of the second generation stars in globular clusters, we test the effect of a varying initial stellar mass function (IMF) of the G1 stars on the (N(G1)/N(tot)) − α pd anti-correlation. We use a simple collision model which has only two inputs, the IMF of G1 stars and the fraction of G1 stars that coalesce to form G2 stars. We show that a variable efficiency of the collision process is necessary in order to explain the (N(G1)/N(tot)) − α pd anti-correlation, however, the scatter in the anticorrelation can only be explained by variations in the IMF, and in particular by variations of the slope in the mass interval ≈ (0.1-0.5) M ⊙ . Our results indicate that in order to explain the scatter in the (N(G1)/N(tot)) − α pd relation, it is necessary to invoke variations of the slope in this mass range between ≈ −0.9 and ≈ −1.9. Interpreted in terms of a Kroupa-like broken power law, this translates into variations of the mean mass between ≈ 0.2 and 0.55 M ⊙ . This level of variations is consistent with what is observed for young stellar clusters in the Milky Way and may reflect variations in the physical conditions of the globular clusters progenitor clouds at the time the G1 population has formed or to the occurrence of collisions between protostellar embryos before stars settle on the Main Sequence.