Sunan an-Nasa'i, Volume 2, Book 13, Hadith 1331 (DarusSalam)

It was narrated from Abu Hurairah that: "The Messenger of Allah said the salam then he performed two prostrations of forgetfulness while he was still sitting, then he said the salam." He said: He mentioned it in the hadith of Dhul-Yadain.

أَخْبَرَنَا سُوَيْدُ بْنُ نَصْرٍ، عَنْ عَبْدِ اللَّهِ بْنِ الْمُبَارَكِ، عَنْ عِكْرِمَةَ بْنِ عَمَّارٍ، قَالَ حَدَّثَنَا ضَمْضَمُ بْنُ جَوْسٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم سَلَّمَ ثُمَّ سَجَدَ سَجْدَتَىِ السَّهْوِ وَهُوَ جَالِسٌ ثُمَّ سَلَّمَ ‏.‏ قَالَ ذَكَرَهُ فِي حَدِيثِ ذِي الْيَدَيْنِ ‏.‏

sunnah.com