It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) said: "Seek Laylat al-Qadr in the last ten nights of Ramadan when nine, seven, or five nights remain (that is, on the twenty-first, twenty-third, and twenty-fifth nights)."
Sayyiduna Ibn Abbas (may Allah be pleased with them both) in another narration says that the Messenger of Allah (peace and blessings of Allah be upon him) said: "Laylat al-Qadr is in the last ten nights; when nine nights have passed (i.e., the twenty-ninth) or when seven nights remain (i.e., the twenty-third)." By this, he (peace be upon him) meant Laylat al-Qadr.