Self-similarity in periodically forced oscillators