It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) in a marfu' form (attributed to the Prophet) that whoever says: "Subhan Allah wa bihamdihi, astaghfirullah wa atubu ilayh (Glory be to Allah and with His praise; I seek forgiveness from Allah and I turn to Him in repentance)," it is written exactly as he said it, then it is hung on the Throne, and no sin that he commits (afterwards) erases it until he meets Allah, and it remains sealed just as he said it.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12744