Magnetism on Cu(001) due to a Single Transition-Metal Impurity