Cyanopolyynes (HC_2n+1_N, n=1,2,3), which are the linear carbon chain molecules, are precursors for the prebiotic synthesis of simple amino acids. They are important for understanding prebiotic chemistry and may be good tracers of the star formation sequence. We aim to search for cyanopolyynes in high-mass star-forming regions (HMSFRs) at possibly different evolutionary stages, investigate the evolution of HC_3_N and its relation with shock tracers, and detect the existence of HC_5_N and HC_7_N in HMSFRs with a formed protostar. We carried out a cyanopolyyne line survey towards a large sample of HMSFRs using the Shanghai Tian Ma 65m Radio Telescope (TMRT). Our sample consisted of 123 targets taken from the TMRT C band line survey. It included three kinds of sources, namely those with detection of the 6.7GHz CH_3_OH maser alone, with detection of the radio recombination line (RRL) alone, and with detection of both (hereafter referred to as Maser-only, RRL-only, and Maser-RRL sources, respectively). For our sample with detection of cyanopolyynes, their column densities were derived using the rotational temperature measured from the NH_3_ lines. We constructed and fitted the far-infrared (FIR) spectral energy distributions (SED; obtained from the Herschel FIR data and the Atacama Pathfinder Experiment data at 870 um) of our HC_3_N sources. Moreover, by analysing the relation between HC_3_N and other shock tracers, we also investigate whether HC_3_N is a good tracer of shocks. We detected HC_3_N in 38 sources, HC_5_N in 11 sources, and HC_7_N in G24.790+0.084, with the highest detection rate being found for Maser-RRL sources and a very low detection rate found for RRL-only sources. The mean column density of HC_3_N was found to be (1.75+/-0.42)x10^13^, (2.84+/-0.47)x10^13^, and (0.82+/-0.15)x10^13^cm^-2^ for Maser-only, Maser-RRL, and RRL-only sources, respectively. Based on a fit of the FIR SED, we derive their dust temperatures, H_2_ column densities, and abundances of cyanopolyynes relative to H_2_. The mean relative abundance of HC_3_N was found to be (1.22+/-0.52)x10^-10^ for Maser-only, (5.40+/-1.45)x10^-10^ for Maser-RRL, and (1.65+/-1.50)x10^-10^ for RRL-only sources, respectively. The detection rate, the column density, and the relative abundance of HC_3_N increase from Maser-only to Maser-RRL sources and decrease from Maser-RRL to RRL-only sources. This trend is consistent with the proposed evolutionary trend of HC_3_N under the assumption that our Maser-only, Maser-RRL, and RRL-only sources correspond to massive young stellar objects, ultracompact HII regions, and normal classical HII regions, respectively. Our detections enlarge the sample of HC_3_N in HMSFRs and support the idea that unsaturated complex organic molecules can exist in HMSFRs with a formed protostar. Furthermore, a statistical analysis of the integrated line intensity and column density of HC_3_N and shock-tracing molecules (SiO, H_2_CO) enabled us to find positive correlations between them. This suggests that HC_3_N may be another tracer of shocks, and should therefore be the subject of further observations and corresponding chemical simulations. Our results indirectly support the idea that the neutral-neutral reaction between C_2_H_2_ and CN is the dominant formation pathway of HC_3_N.
Cone search capability for table J/A+A/663/A177/tableb1 (The HC_3_N (J = 2-1) transitions detected with the TMRT)
Cone search capability for table J/A+A/663/A177/tableb2 (The HC_5_N (J=3-2) and HC_7_N (J=15-14) transitions detected with TMRT)
Cone search capability for table J/A+A/663/A177/tableb3 (The column density and the relative abundance for HC_3_N, HC_5_N, and HC_7_N.)
Cone search capability for table J/A+A/663/A177/tablec1 (Sources without HC_3_N (J=2-1) detection)