Metal-induced progressive alteration of conducting states in memristors for implementing an efficient analog memory: a DFT-supported experimental approach