First-principles calculation of the interaction between nitrogen atoms and vacancies in silicon