Bismillahi Al-Rahmani Al-Rahim
Ibn `Abbas (Allah be well pleased with him) related the following:
We were with the Messenger of Allah (Allah bless him and give him peace) when `Ali (Allah be well pleased with him) and said, "Bi abi anta wa ummi, O Messenger of Allah: this Qurâ€™an has slipped from my breast, and I do not find myself capable of it!"
So the Messenger of Allah (Allah bless him and give him peace) said, "O Aba al-Hasn! Should I not teach you words that Allah will benefit you with, and that He will benefit with them anyone whom you taught them to, and firmly fix what you learnt in your breast?"
He said, "Of course, O Messenger of Allah! Teach me."
He said, "When it is Friday night and you are able to get up in the last third of the night - since it is an observed time and during it supplication is answered, and my brother Ya`qub said to his sons â€˜I will seek forgiveness for you from my Lordâ€™ until Friday night comes, and if you are not able then rise in the middle, and if you are not able then rise in the beginning, and pray four rak`at. Recite al-Fatihah and Ya Sin in the first rak`a, al-Fatihah and al-Dukhan in the second rak`a, al-fatihah and al-Sajda in the third, and al-Fatihah and Tabarak in the fourth. When you finish the tashahud praise and completely extol Allah, make prayers upon me and the other prophets, seek forgiveness for the male and female believers and for your brothers preceding you in belief, and then at the end of this say:
Allahumma arhamni bi tarki al-ma`asi abadan ma abqaytani, wa arhmani an atakallafa ma ya ya`nini wa-rzuqni husna al-nazri fi ma yardika `anni.
Allahumma badi` al-samawati wa al-ard dha al-jalal wa al-ikram wa al-`izzat allati ta turam: asâ€™aluka ya Allahu ya rahmanu bi jalalika wa nuri wajhika an tulzima qalbi hifza kitabika ka ma `allamtani wa-rzuqni an atluwahu `ala al-nahwi alladhi yurdika `anni
Allahumma badi` al-samawati wa al-ardi dha al-jalali wa al-ikrami wa al-`izzati allati la turam: asâ€™aluka ya Allahu ya rahmanu bi jalalika wa nir wajhika an tunawwira bi kitabika basari wa an tutliqa bihi lisani wa an tufarrija bihi `an qalbi wa an tashraha bihi sadri wa an tu`mila bihi badani liannahu la yu`inuni `ala al-haqqi ghayruka wa la yuâ€™tihi illa anta wa la hawla wa la quwwata illa billa al-`athim
O, Aba al-Hasan! Do this three, five, or seven Fridays and you will be answered by Allahâ€™s leave. [I swear] by the One who sent me: It will never err a believer.â€
To which Ibn `Abbas (Allah be well pleased with him) adds:
[I swear] by Allah: `Ali (Allah be well pleased with him) did not wait save five or seven [times] until he came to the Messenger of Allah (Allah bless him and give him peace) in a similar assembly and said, â€œO, Messenger of Allah (Allah bless him and give him peace)! In the past I would only take something like four verses and if I read them to myself they would depart me, while today I learn something like forty verses and when I recite them to myself it is as if the Book of Allah is in in front of my eyes; and I used to hear hadith and when I repeated it it would depart me, while today I hear hadiths and when I recount them I do not drop a single letter from it.â€
So the Messenger of Allah (Allah bless him and give him peace) at that point said, â€œA believer â€" [I swear] by the Lord of the Ka`ba â€" O, Aba al-Hasan!â€
Imam al-Tirmithi narrated this hadith .
Manur `Ali Nasif comments in his Al-Tajj al-jami` li-l-usul on the above hadith (5.141-42)
 It is good to say when making this praise, extolling, and seeking forgiveness:
Al-hamdu lillahi rabb al-`alamin. Al-hamdu lillahi allathi khalaqa al-samawat wa al-ardh a ja`ala al-thulamat wa al-nur. Al-hamdu lillahi allathi anzala `ala `abdihi al-kitab. Subhana Allahu wa al-hamdu lillahi wa la ilaha illa allaha wa Allahu akbar, and la hawla wa la quwwata illa billahi al-`ali al-`athim. Subhan allah wa bi hamdihi, subhan allah al-`athim.
Allahumma salli wa sallam wa barik `ala sayyidina muhammadin wa `ala saâ€™iri ikhwanihi al-nabiyyin wa al-muraslin `adad khalqika wa ridha nafsika wa zinata `arshika wa midadi kalimatika ma dama mulku allahi ta`ala.
Rabbana ighfir lana wa li ikhwanina allathina sabaquna bil-l-iman wa la taj`al fi qulubina ghulan lillathina aamanu. Rabbana innaka raâ€™ufun rahim.
Allahumma arhamni bi tark al-ma`asiâ€¦
 And before the salam praise Allah, make remembrance of Him, and supplicate Him with the following, or: what is intended is when you have make salam, and this is the most obvious [interpretation] since supplication is answered immediately after prayer, and he remains in his prayer as long as he remains in the place he prayed, and the angels pray for him and say â€˜Aminâ€™ to his supplication as long as he remains in the place he prayed in.
 Meaning: It will never let down a believer who uses it with a heart pure for Allah Most High.
 With a well authenticated chain.
[Source: Mansur `Ali Nasf, Al-Tajj al-jami` li-l-usul. 5.141-42]
And Allah knows best.
Wa al-salamu `alaykum,