The Lie algebra of polynomial vector fields on the sphere with two punctures (also known as the Witt algebra or the centerless Virasoro algebra) can be generalized in different ways. In this paper the Lie algebra obtained by allowing poles at three points rather than only two is considered. Using some elementary representation theory of the symmetric group on three letters, a convenient basis for this Lie algebra is determined, such that the commutator of two basis elements is a linear combination of at most three other basis elements. The expressions for the basis elements show that this Lie algebra is related to modular forms for a level-2 congruence subgroup of SL2(Z). A conclusion is given with some suggestions for further investigation.