The Messenger of Allah ﷺ said, "Seek Laylat al-Qadr in the last ten nights of Ramadan, when nine remain, when seven remain, when five remain, and when three remain."
حدثنا عفان حدثنا حماد بن سلمة عن حميد عن أبي نضرة
أن رسول الله ﷺ قال اطلبوا ليلة القدر في العشر الأواخر من رمضان في تسع يبقين وسبع يبقين وخمس يبقين وثلاث يبقين
Its isnad is sahih, and Humayd is Humayd al-Tawil. The hadith was reported by Tirmidhi 3/149, no. 792, in the Book of Fasting, chapter on what has been said about Laylat al-Qadr, and by Ibn Abu Shayba 2/513, in the Book of Prayer, chapter on Laylat al-Qadr, and by Tabarani in Al-Kabir 2/244, and by Bayhaqi 4/308.