Resonance transitions in the Mg i and Ar i isoelectronic sequences from Cu to Mo