  We study the Galam majority rule dynamics with contrarian behavior and an
oscillating external propaganda, in a population of agents that can adopt one
of two possible opinions. In an iteration step, a random agent interacts with
other three random agents and takes the majority opinion among the agents with
probability $p(t)$ (majority behavior) or the opposite opinion with probability
$1-p(t)$ (contrarian behavior). The probability of following the majority rule
$p(t)$ varies with the temperature $T$ and is coupled to a time-dependent
oscillating field that mimics a mass media propaganda, in a way that agents are
more likely to adopt the majority opinion when it is aligned with the sign of
the field. We investigate the dynamics of this model on a complete graph and
find various regimes as $T$ is varied. A transition temperature $T_c$ separates
a bimodal oscillatory regime for $T<T_c$ where the population's mean opinion
$m$ oscillates around a positive or a negative value, from a unimodal
oscillatory regime for $T>T_c$ in which $m$ oscillates around zero. These
regimes are characterized by the distribution of residence times that exhibits
a unique peak for a resonance temperature $T^*$, where the response of the
system is maximum. An insight into these results is given by a mean-field
approach, which also shows that $T^*$ and $T_c$ are closely related.
