The necessity of the Hopf bifurcation for periodically forced oscillators