  Cyanogen (NCCN) is the simplest member of the dicyanopolyynes group, and has
been proposed as a major source of the CN radical observed in cometary
atmospheres. Although not detected through its rotational spectrum in the cold
interstellar medium, this very stable species is supposed to be very abundant.
The chemistry of cyanogen in the cold interstellar medium can be investigated
through its metastable isomer, CNCN (isocyanogen). Its formation may provide a
clue on the widely abundant CN radical observed in cometary atmospheres. We
performed an unbiased spectral survey of the L1544 proto-typical prestellar
core, using the IRAM-30m and have analysed, for this paper, the nitrogen
chemistry that leads to the formation of isocyanogen. We report on the first
detection of CNCN, NCCNH+, C3N, CH3CN, C2H3CN, and H2CN in L1544. We built a
detailed chemical network for NCCN/CNCN/HC2N2+ involving all the nitrogen
bearing species detected (CN, HCN, HNC, C3N, CNCN, CH3CN, CH2CN, HCCNC, HC3N,
HNC3, H2CN, C2H3CN, HCNH+, HC3NH+) and the upper limits on C4N, C2N. The main
cyanogen production pathways considered in the network are the CN + HNC and N +
C3N reactions. The comparison between the observations of the nitrogen bearing
species and the predictions from the chemical modelling shows a very good
agreement, taking into account the new chemical network. The expected cyanogen
abundance is greater than the isocyanogen abundance by a factor of 100.
Although cyanogen cannot be detected through its rotational spectrum, the
chemical modelling predicts that it should be abundant in the gas phase and
hence might be traced through the detection of isocyanogen. It is however
expected to have a very low abundance on the grain surfaces compared to HCN.
