The equality between the number of odd spin structures on a Riemann surface
of genus g, with $2^g - 1$ being a Mersenne prime, and the even perfect
numbers, is an indication that the action of the modular group on the set of
spin structures has special properties related to the sequence of perfect
numbers. A method for determining whether Mersenne numbers are primes is
developed by using a geometrical representation of these numbers. The
connection between the non-existence of finite odd perfect numbers and the
irrationality of the square root of twice the product of a sequence of repunits
is investigated, and it is demonstrated, for an arbitrary number of prime
factors, that the products of the corresponding repunits will not equal twice
the square of a rational number.