  A closed geodesic on the modular surface gives rise to a knot on the 3-sphere
with a trefoil knot removed, and one can compute the linking number of such a
knot with the trefoil knot. We show that, when ordered by their length, the set
of closed geodesics having a prescribed linking number become equidistributed
on average with respect to the Liouville measure. We show this by using the
thermodynamic formalism to prove an equidistribution result for a corresponding
set of quadratic irrationals on the unit interval.
