Sunan Abi Dawud, Hadith 1016

This tradition has also been transmitted by ‘Abd Allah (b. Mas’ud) through a different chain of narrators. This version goes; when one of you forgets (in his prayer), he should perform two prostrations. Then he turned away, and performed two prostrations (due to forgetfulness). Abu Dawud said: The narrator Husain also reported it like al-A'mash.

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

sunnah.com