Verses 1-9 - David's sons
Verses 10-16 - Judah's sons (kings of Judah)
Verses 17-24 - Jehoiachin's sons (royal line after the exile)