  The oxygen and nitrogen abundance evolutions with redshift and galaxy stellar
mass in emission-line SDSS galaxies are investigated. This is the first such
study for nitrogen abundances, and it provides an additional constraint for the
study of the chemical evolution of galaxies. We have devised a criterion to
recognize and exclude from consideration AGNs and star-forming galaxies with
large errors in the line flux measurements. To select star-forming galaxies
with accurate line fluxes measurements, we require that, for each galaxy, the
nitrogen abundances derived with various calibrations based on different
emission lines agree. Using this selection criterion, subsamples of
star-forming galaxies have been extracted from catalogs of the MPA/JHU group.
We found that the galaxies of highest masses, those with masses > 10^11.2
M_sun, have not been enriched in both oxygen and nitrogen over the last 3 Gyr:
they have formed their stars in the so distant past that these have returned
their nucleosynthesis products to the interstellar medium before z=0.25. The
galaxies in the mass range from 10^11.0 M_sun to 10^11.2 M_sun do not show an
appreciable enrichment in oxygen, but do show some enrichment in nitrogen: they
also formed their stars before z=0.25 but later in comparison to the galaxies
of highest masses; these stars have not returned nitrogen to the interstellar
medium before z=0.25 because they have not had enough time to evolve. This
suggests that stars with lifetimes of 2-3 Gyr contribute to the nitrogen
production. Finally, galaxies with masses < 10^11 M_sun show enrichment in both
oxygen and nitrogen during the last 3 Gyr: they have undergone appreciable star
formation and have converted up to 20% of their mass into stars over this
period.
