Abu Saeed Khudri reported,

The Messenger of Allah ﷺ said, "Seek it in the last ten nights of Ramadan. Seek it on the ninth, the seventh, and the fifth."I said, "Abu Saeed, you know the counting better than we do."He said, "Indeed, we have more right to that knowledge than you."I said, "What is meant by the ninth, the seventh, and the fifth?"He replied, "When twenty-one nights have passed, the night that follows is the ninth. When twenty-three have passed, the night that follows is the seventh. When twenty-five have passed, the night that follows is the fifth."

Azami 4677

Sahih

عن أبي سعيد الخدري قال

قال رسول الله ﷺ: التمسوها في العشر الأواخر من رمضان، والتمسوها في التاسعة، والسابعة، والخامسة، قال قلت يا أبا سعيد، إنكم أعلم بالعدد منا. قال: أجل، نحن أحق بذلك منكم قال: قلت: ما التاسعة والسابعة والخامسة؟ قال: إذا مضت واحدة وعشرون فالتي تليها التاسعة. فإذا مضت ثلاث وعشرون فالتي تليها السابعة، فإذا مضى خمس وعشرون فالتي تليها الخامسة.

الأعظمي 4677صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Virtue of Laylat al-Qadr and the striving of the Prophet ﷺ ﷺ in it
Section
Laylat al-Qadr being on the twenty-first, twenty-third, and twenty-fifth
Numbering
Jami al-Kamil 4677 (2nd edition)
Azami 4677