If a man marries a virgin while already having a non-virgin wife, he stays with the virgin for seven nights. If he marries a non-virgin, he stays with her for three nights. If I were to say that he attributed this to the Prophet ﷺ, I would be telling the truth, but he said, "Such is the sunnah."
حدثنا عثمان بن أبي شيبة حدثنا هشيم وإسمعيل ابن علية عن خالد الحذاء عن أبي قلابة
إذا تزوج البكر على الثيب أقام عندها سبعا وإذا تزوج الثيب أقام عندها ثلاثا ولو قلت إنه رفعه لصدقت ولكنه قال السنة كذلك
Muslim narrated it in the Book of Suckling, chapter on the length of time a husband should spend with a virgin or a previously married woman following the wedding, hadith no. 1461, from the hadith of Hushaym.Bukhari narrated it in the Book of Marriage, chapter titled "When a man marries a virgin while already having a previously married wife," hadith no. 5213, from the hadith of Khalid Haddan, with the same wording.