Reference for Sanhedrin 41:8
ור' שמעון אמר לך מכדי בעלמא דרשינן טעמא דקרא א"כ לכתוב קרא לא ירבה לו נשים ולישתוק ואנא אמינא מה טעם לא ירבה משום דלא יסור לא יסור למה לי אפילו אחת ומסירה את לבו הרי זו לא ישאנה אלא מה אני מקיים לא ירבה דאפילו כאביגיל
Whence do we deduce the number eighteen? — From the verse, And unto Davidwere sons born in Hebron; and his first-born was Ammon of Ahinoam theJezreelitess; the second, Chileab of Abigail the wife of Nabal the Carmelite;the third Absalom the son of Maacah; and the fourth, Adonijah the son ofHaggith; and the fifth, Shefatiah the son of Abital; and the sixth, Ithreamof Eglah, David's wife. These were born to David inHebron.<span class="x" onmousemove="('comment',' II Sam. III, 2-5. ');"><sup>14</sup></span> And of them the Prophetsaid: And if that were too little, then would I add unto thee the like ofthese, [Ka-hennah] and the like of these,[we-kahennah],<span class="x" onmousemove="('comment',' Ibid. XII, 8. ');"><sup>15</sup></span>