The Prophet ﷺ said: Seek it (laylat al-Qadr) in the last ten days of Ramadan. Seek it on the ninth, seventh and fifth night. I (AbuNadrah) said: You know counting better than us, AbuSa'id. He said: Yes. I asked: What do you mean by the ninth, seventh and fifth night? He said: When the twenty-first night passes, the night which follows it is the night; when the twenty-third night passes, the night which follows it is the seventh; when the twenty-fifth passes, the night which follows it is the fifth. Abu Dawud said: I do not know whether anything remained hidden from me or not.
قَالَ رَسُولُ اللَّهِ ﷺ الْتَمِسُوهَا فِي الْعَشْرِ الأَوَاخِرِ مِنْ رَمَضَانَ وَالْتَمِسُوهَا فِي التَّاسِعَةِ وَالسَّابِعَةِ وَالْخَامِسَةِ قَالَ قُلْتُ يَا أَبَا سَعِيدٍ إِنَّكُمْ أَعْلَمُ بِالْعَدَدِ مِنَّا قَالَ أَجَلْ قُلْتُ مَا التَّاسِعَةُ وَالسَّابِعَةُ وَالْخَامِسَةُ قَالَ إِذَا مَضَتْ وَاحِدَةٌ وَعِشْرُونَ فَالَّتِي تَلِيهَا التَّاسِعَةُ وَإِذَا مَضَى ثَلاَثٌ وَعِشْرُونَ فَالَّتِي تَلِيهَا السَّابِعَةُ وَإِذَا مَضَى خَمْسٌ وَعِشْرُونَ فَالَّتِي تَلِيهَا الْخَامِسَةُ