Sahih Muslim Book 6, Hadith Number 2630.

Chapter : Excellence of Lailat-ul Qadar and exhortation to find it.

Abu Sa’id al-Khudri (Allah be pleased with him) reported: The Messenger of Allah (may peace be upon him) observed i’tikaf in the middle ten days of Ramadan to seek Lailat-ul-Qadr before it was made manifest to him. When (these nights) were over, he commanded to strike the tent. Then it was made manifest to him that (Lailat-ul-Qadr) was in the last ten nights (of Ramadan), and commanded to pitch the tent (again). He then came to the people and said: O people, Lailat-ul-Qadr was made manifest to me and I came out to inform you about it that two persons came contending with each other and there was a devil along with them and I forgot it. So seek it in the last ten nights of Ramadan. Seek it on the ninth, on the seventh and on the fifth. I (one of the narrators) said: Abu Sa’id, you know more than us about numbers. He said: Yes, indeed we have better right than you. I said: What is this ninth, seventh, and fifth? He said: When twenty-one (nights are over) and the twenty-second begins, it is the ninth, and when twenty-three (nights) are over, that which follows (the last night) is the seventh, and when twenty-five nights are over, what follows it is fifth. Ibn Khallad said: Instead of the word Yahliqan (contending), he said Yakhtasiman, (they are disputing).