  Harmonic oscillators with multiple abrupt jumps in their frequencies have
been investigated by several authors during the last decades. We investigate
the dynamics of a quantum harmonic oscillator with initial frequency
$\omega_0$, that undergoes a sudden jump to a frequency $\omega_1$ and, after a
certain time interval, suddenly returns to its initial frequency. Using the
Lewis-Riesenfeld method of dynamical invariants, we present expressions for the
mean energy value, the mean number of excitations, and the transition
probabilities, considering the initial state different from the fundamental. We
show that the mean energy of the oscillator, after the jumps, is equal or
greater than the one before the jumps, even when $\omega_1<\omega_0$. We also
show that, for particular values of the time interval between the jumps, the
oscillator returns to the same initial state.
