Synchronization of an array of spin torque nano oscillators in periodic applied external magnetic field