  The detection of mixed modes in red giants with space missions CoRoT and
Kepler has revealed their deep internal structure. These modes allow us to
characterize the pattern of pressure modes (through the measurement of their
asymptotic frequency separation $\Delta\nu$) and the pattern of gravity modes
(through the determination of their asymptotic period spacing $\Delta\Pi_1$).
It has been shown that red giant branch (RGB) stars regroup on a well-defined
sequence in the $\Delta\nu$-$\Delta\Pi_1$ plane. Our first goal is to
theoretically explain the features of this sequence and understand how it can
be used to probe the interiors of red giants. Using a grid of red giant models
computed with MESA, we demonstrate that red giants join the
$\Delta\nu$-$\Delta\Pi_1$ sequence whenever electron degeneracy becomes strong
in the core. We argue that this can be used to estimate the central densities
of these stars, and potentially to measure the amount of core overshooting
during the main sequence part of the evolution. We also investigate a puzzling
subsample of red giants that are located below the RGB sequence, in
contradiction with stellar evolution models. After checking the measurements of
the asymptotic period spacing for these stars, we show that they are mainly
intermediate-mass red giants. This is doubly peculiar because these stars
should have nondegenerate cores and are expected to be located well above the
RGB sequence. We show that these peculiarities are well accounted for if these
stars result from the interaction between two low-mass ($M\lesssim2\,M_\odot$)
close companions during the red giant branch phase. If the secondary component
has already developed a degenerate core before mass transfer begins, it becomes
an intermediate-mass giant with a degenerate core. The secondary star is then
located below the degenerate sequence, in agreement with the observations.
