  We present the discovery with the QUIJOTE line survey of the cations HC5N+
and HC7N+ in the direction of TMC-1. Seven lines with half-integer quantum
numbers from J=25/2-23/2 to 37/2-35/2 have been assigned to HC5N+ and eight
lines from J=55/2-53/2 to 71/2-69/2 to HC7N+. Both species have inverted 2Pi
ground electronic states with very good estimates for their B0 and AS0
constants based on optical observations. The lines with the lowest J of HC5N+
exhibit multiple components due to the hyperfine structure introduced by the H
and N nuclei. However, these different components collapse for the higher J. No
hyperfine structure is found for any of the lines of HC7N+. The derived
effective rotational and distortion constants for HC5N+ are Beff = 1336.662+/-
0.001 MHz and Deff = 27.4+/-2.6 Hz, while for HC7N+ they are Beff =
567.85036+/-0.00037 MHz and Deff = 4.01+/-0.19 Hz. From the observed
intensities, we derived Trot = 5.5+/-0.5K and N = (9.9+/-1.0)x 1010 cm-2 for
HC5N+, while we obtained Trot = 8.5+/-0.5K and N = (2.3+/-0.2)x1010 cm-2 for
HC7N+. The HC5N/HC5N+, C5N/HC5N+, C5N-/HC5N+, HC7N/HC7N+, HC5N+/HC7N+, and
C7N-/HC7N+ abundance ratios are 670+/-80, 4.8+/-0.8, 1.2+/-0.2, 1000+/-150,
4.2+/-0.5, and 2.2+/-0.2, respectively. We have run chemical modelling
calculations to investigate the formation and destruction of these new cations.
We find that these species are mainly formed through the reactions of H2 and
the cations C5N+ and C7N+, and by the reactions of H+ with HC5N and HC7N, while
they are mostly destroyed through a reaction with H2 and a dissociative
recombination with electrons. Based on the underestimation of the abundances of
HC5N+ and HC7N+ by the chemical model by a factor around 20, we suggest that
the rate coefficients currently assumed for the reactions of these cations with
H2 could be too high by the same factor, something that will be worth
investigating.
