Magnetic remanence in single atoms