It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that he heard the Noble Prophet (peace and blessings be upon him) say: A man commits a sin and then says, "O Lord! I have committed a sin, forgive me." Allah Almighty says: "My servant has committed a sin and he knows that he has a Lord who forgives sins or punishes for them. I have forgiven My servant." The Noble Prophet (peace and blessings be upon him) repeated this three more times, that the servant again commits a sin and confesses as before, and Allah responds as before. The fourth time, at the end, the Noble Prophet (peace and blessings be upon him) said that Allah Almighty says: "My servant knows that he has a Lord who forgives sins or punishes for them. I have forgiven My servant."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 9256