Matthew 1:3-6

1:3 Judah the father of Perez and Zerah (by Tamar), Perez the father of Hezron, Hezron the father of Ram, 1:4 Ram the father of Amminadab, Amminadab the father of Nahshon, Nahshon the father of Salmon, 1:5 Salmon the father of Boaz (by Rahab), Boaz the father of Obed (by Ruth), Obed the father of Jesse, 1:6 and Jesse the father of David the king.

David was the father of Solomon (by the wife of Uriah),