كتاب الرضاع
17  
The Book of Suckling
(12)
Chapter: How long a virgin and a previously-married woman are entitled to have the husband stay with them after marriage
(12)
باب قَدْرِ مَا تَسْتَحِقُّهُ الْبِكْرُ وَالثَّيِّبُ مِنْ إِقَامَةِ الزَّوْجِ عِنْدَهَا عَقِبَ الزِّفَافِ
Sahih Muslim 1461 a

Anas b. Malik reported:

When anyone who has already a wife marries virgin, he should stay with her for seven nights (and then turn to his other wife), but when anyone having a virgin with him (as his wife) marries a woman who has been previously married he should stay with her for three nights. Khalid (one of the narrators) said. If I were to say that it could be directly traced to the Prophet (ﷺ). I would have told the truth, but he (Hadrat Anas) said: Such is the tradition.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا هُشَيْمٌ، عَنْ خَالِدٍ، عَنْ أَبِي قِلاَبَةَ، عَنْ أَنَسِ بْنِ، مَالِكٍ قَالَ إِذَا تَزَوَّجَ الْبِكْرَ عَلَى الثَّيِّبِ أَقَامَ عِنْدَهَا سَبْعًا وَإِذَا تَزَوَّجَ الثَّيِّبَ عَلَى الْبِكْرِ أَقَامَ عِنْدَهَا ثَلاَثًا ‏.‏ قَالَ خَالِدٌ وَلَوْ قُلْتُ إِنَّهُ رَفَعَهُ لَصَدَقْتُ وَلَكِنَّهُ قَالَ السُّنَّةُ كَذَلِكَ ‏.‏
Reference : Sahih Muslim 1461a
In-book reference : Book 17, Hadith 59
USC-MSA web (English) reference : Book 8, Hadith 3448
  (deprecated numbering scheme)