On the genus and Hartshorne-Rao module of projective curves