Judah and his sons: Shelah, Perez, and Zerah. (Judah's other sons, Er and Onan, had died in Canaan.) Perez' sons were Hezron and Hamul.
This is the family line from Perez to David: Perez, Hezron, Ram, Amminadab, Nahshon, Salmon, Boaz, Obed, Jesse, David.
the son of Amminadab, the son of Admin, the son of Arni, the son of Hezron, the son of Perez, the son of Judah,