The Rules of Forgetfulness (Sahw) in Prayer
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 50
وَ رُوِيَ عَنْ عُمَرَ بْنِ يَزِيدَ أَنَّهُ قَالَ: شَكَوْتُ إِلَى أَبِي عَبْدِ اَللَّهِ عَلَيْهِ اَلسَّلاَمُ اَلسَّهْوَ فِي اَلْمَغْرِبِ فَقَالَ «صَلِّهَا بِ «قُلْ هُوَ اَللّٰهُ أَحَدٌ» وَ «قُلْ يٰا أَيُّهَا اَلْكٰافِرُونَ» » فَفَعَلْتُ ذَلِكَ فَذَهَبَ عَنِّي.
It was narrated from Umar ibn Yazid that He said: "I complained to Imam Jafar ibn Muhammad Al-Sadiq عليه السلام about my forgetfulness during the Maghrib prayer. Imam عليه السلام said: 'Pray it by reciting 'Qul Huwa Allahu Ahad' (Surah Al-Ikhlas) and Say, O’ disbelievers (Surah Al-Kafirun).' So, I did as he instructed, and it took away my forgetfulness”.
- Ṣaḥīḥ al-Faqīh