Periodic solutions to perturbed nonlinear oscillators with memory