Optimal encoding of oscillators into more oscillators