In the period between David and Jesus only two names are common in the lists: Shealtiel and Zerubbabel. Some sixty names in Luke's list are not in Matthew's. The most significant differences are that David's descendant in Matthew's list is Solomon, while Luke mentions Nathan; and Jesus' grandfather in Matthew's list is Jacob, while in Luke it is Heli (Stein 1992:141). The difference after David helps to explain the vast variation in names after that point.
There is no certain explanation for these differences. Some argue that there is no way to bring the two accounts together (L. T. Johnson 1991:72). But various explanations have been proposed. (1) A popular explanation is that Matthew gives Joseph's genealogy while Luke gives Mary's, especially given his concern for Mary in Luke 2 and the remark about Jesus' being thought to be Joseph's son in Luke 3:23. The problem with this is that a genealogy based entirely on a female line of descent would be rather unprecedented, especially for establishing a regal claim to promises associated with David. Furthermore, Luke 1:27 appears to tie Jesus' Davidic connection to Joseph. (2) Other variations argue for two ways to trace Joseph's line. Some speculate that Matthew has the natural line and Luke the royal line. Others suggest the reverse: Luke has the physical line while Matthew has the royal line. A third option suggests that Matthew gives the physical line while Luke gives the legal and "physical" line, with the physical contact being a sister who remarries and bears a child after a childless marriage. All these options appeal to levirate marriage (Deut 25:5-10) as the key at some point in the list, in the vicinity of the grandfathers--so one parent would be the physical progenitor, but the other parent, who died childless, had his name and line carried on through the birth after the levirate marriage. (3) Still a final option suggests that Mary, having no brothers, is an heiress to Heli (also spelled Eli in some translations). Heli adopted Joseph as son, as in other cases where a man had no biological son (Num 32:41; Ezra 2:61; Neh 7:63). So Luke's list reflects adoption (Nolland 1990:170-72). Luke's line may be the legal one because of the curse of Jeconiah (Jer 22:30), when he was cast out of the promised line (though Matthew does mention him). (A modern illustration of how a regal line can take a detour is the Duke of Windsor, who renounced all claim to the throne for himself and his descendants.)
Every explanation requires a conjecture that we cannot establish, so which approach might be right is uncertain. Regardless of which option is chosen, what is clear is the list's intention. Jesus has a claim to the throne through David and is related to all humankind through Adam. He has the proper roots to be God's promised one. He has the right heritage to inherit this ministry of deliverance. His roots extend to David, Abraham and Adam. God has carefully designed his plan. There are no historical surprises in Jesus. Ultimately all humanity is a unit, and Jesus is concerned with more than deliverance of the tiny, elect nation of Israel. With him comes realization of the Old Testament hope for that nation, but bound up in him also is the fate of all people.