Starting this thread because of Wick Stick's posts in Has the church got Genesis all wrong?
And his reply #77 in which he said
Now... perhaps this will help confuse things even more.
en.wikipedia.org
You need to see the entire link above to read the entire article of explanation.
It is far too long and would require multiple posts to get it here.
Basic Highlights are
~~~~~~~~~
Traditional Christian scholars (starting with Africanus and Eusebius[3]) take both lineages to be true, offering various explanations for their divergence.[4] For instance, one (usually Matthew's) may be taken to be the lineage of Joseph and the other (usually Luke's) of Mary, or one may be Jesus' customary legal lineage and the other his biological blood lineage. These versions can also fit the gospels' simultaneous account of Jesus' virgin birth of Mary alone, with Joseph being merely his legal adoptive father; both Joseph and Mary are taken to be David's descendants.
Matthew 1:1–17 begins the Gospel with "A record of the origin of Jesus Christ, the son of David, the son of Abraham: Abraham begot Isaac, ..." and continues on until "... Jacob begot Joseph, the husband of Mary, of whom was born Jesus, who is called Christ. Thus there were fourteen generations in all from Abraham to David, fourteen from David to the exile to Babylon, and fourteen from the exile to the Christ."
See chart in link where you will see The total of 42 generations is achieved only by omitting several names, so the choice of three sets of fourteen seems deliberate.
This genealogy descends from the Davidic line through Nathan, who is an otherwise little-known son of David, mentioned briefly in the Old Testament.[17]
In the ancestry of David, Luke agrees completely with the Old Testament. Cainan is included between Arphaxad and Shelah, following the Septuagint text (though not included in the Masoretic Text followed by most modern Bibles).
Augustine[18] notes that the count of generations in the Book of Luke is 77, a number symbolizing the forgiveness of all sins.[19] This count also agrees with the seventy generations from Enoch[20] set forth in the Book of Enoch, which Luke probably knew.[21] Though Luke never counts the generations as Matthew does, it appears he also followed hebdomadic principle of working in sevens. However, Irenaeus counts only 72 generations from Adam.[22]
The reading "son of Aminadab, son of Aram", from the Old Testament is well attested. The Nestle-Aland critical edition, considered the best authority by most modern scholars, accepts the variant "son of Aminadab, son of Admin, son of Arni",[23] counting the 76 generations from Adam rather than God.[24]
Luke's qualification "as was supposed" (ἐνομίζετο) avoids stating that Jesus was actually a son of Joseph, since his virgin birth is affirmed in the same gospel. Some view that "as was supposed of Joseph" regards Luke as calling Jesus a son of Eli—meaning that Heli (Ἠλί, Heli) was the maternal grandfather of Jesus, with Luke tracing the ancestry of Jesus through Mary, his nearest blood relative, while listing Heli’s son-in-law Joseph rather than Mary in order to maintain the patriarchal structure of the genealogy.[25] D. A. Carson calls this reading "painfully artificial" and would not likely be deduced by readers.[26] Likewise R. P. Nettelhorst calls this reading "unnatural and forced.[27] There are other interpretations of how this qualification relates to the rest of the genealogy. Some see the remainder as the true genealogy of Joseph, despite the different genealogy given in Matthew.[28]
The Church Fathers held that both accounts are true. Eusebius of Cesarea, in his Church history, dedicates the 7th chapter of the first book to that issue, arguing that the divergences are based on whether one is considered as being father by nature or by law. Similarly, in his book An Exact Exposition of the Orthodox Faith, John Damascene argues that Heli of the tribe of Nathan died childless, and Jacob of the tribe of Solomon took his wife and raised up seed to his brother and begat Joseph, in accordance with scripture, namely, yibbum (the mitzvah that a man must marry his brother's childless widow); Joseph, therefore, is by nature the son of Jacob, of the line of Solomon, but by law he is the son of Heli of the line of Nathan.[29]
(see the link for further divergence comments)
You further will see
And more.
And his reply #77 in which he said
I'm not Rella, but... they aren't the same, and they both claim to trace Jesus' lineage through Joseph.
Additionally, Matthew uses a series of names that look very suspicious... he basically re-iterates the names of the patriarchs in the generations just before Jesus. Matthew's genealogy seems to put emphasis on counting the number of generations, which ties into some of the intertestamental prophecies.
Now... perhaps this will help confuse things even more.

Genealogy of Jesus - Wikipedia
You need to see the entire link above to read the entire article of explanation.
It is far too long and would require multiple posts to get it here.
Basic Highlights are
~~~~~~~~~
Traditional Christian scholars (starting with Africanus and Eusebius[3]) take both lineages to be true, offering various explanations for their divergence.[4] For instance, one (usually Matthew's) may be taken to be the lineage of Joseph and the other (usually Luke's) of Mary, or one may be Jesus' customary legal lineage and the other his biological blood lineage. These versions can also fit the gospels' simultaneous account of Jesus' virgin birth of Mary alone, with Joseph being merely his legal adoptive father; both Joseph and Mary are taken to be David's descendants.
Matthew 1:1–17 begins the Gospel with "A record of the origin of Jesus Christ, the son of David, the son of Abraham: Abraham begot Isaac, ..." and continues on until "... Jacob begot Joseph, the husband of Mary, of whom was born Jesus, who is called Christ. Thus there were fourteen generations in all from Abraham to David, fourteen from David to the exile to Babylon, and fourteen from the exile to the Christ."
See chart in link where you will see The total of 42 generations is achieved only by omitting several names, so the choice of three sets of fourteen seems deliberate.
Luke's genealogy[edit]
In the Gospel of Luke, the genealogy appears at the beginning of the public life of Jesus. This version is in ascending order from Joseph to Adam.[15] After telling of the baptism of Jesus, Luke 3:23–38 states, "Jesus himself began to be about thirty years of age, being (as was supposed) the son of Joseph, which was [the son] of Heli, ..." (3:23) and continues on until "Adam, which was [the son] of God." (3:38) The Greek text of Luke's Gospel does not use the word "son" in the genealogy after "son of Joseph". Robertson notes that, in the Greek, "Luke has the article tou repeating uiou (Son) except before Joseph".[16]This genealogy descends from the Davidic line through Nathan, who is an otherwise little-known son of David, mentioned briefly in the Old Testament.[17]
In the ancestry of David, Luke agrees completely with the Old Testament. Cainan is included between Arphaxad and Shelah, following the Septuagint text (though not included in the Masoretic Text followed by most modern Bibles).
Augustine[18] notes that the count of generations in the Book of Luke is 77, a number symbolizing the forgiveness of all sins.[19] This count also agrees with the seventy generations from Enoch[20] set forth in the Book of Enoch, which Luke probably knew.[21] Though Luke never counts the generations as Matthew does, it appears he also followed hebdomadic principle of working in sevens. However, Irenaeus counts only 72 generations from Adam.[22]
The reading "son of Aminadab, son of Aram", from the Old Testament is well attested. The Nestle-Aland critical edition, considered the best authority by most modern scholars, accepts the variant "son of Aminadab, son of Admin, son of Arni",[23] counting the 76 generations from Adam rather than God.[24]
Luke's qualification "as was supposed" (ἐνομίζετο) avoids stating that Jesus was actually a son of Joseph, since his virgin birth is affirmed in the same gospel. Some view that "as was supposed of Joseph" regards Luke as calling Jesus a son of Eli—meaning that Heli (Ἠλί, Heli) was the maternal grandfather of Jesus, with Luke tracing the ancestry of Jesus through Mary, his nearest blood relative, while listing Heli’s son-in-law Joseph rather than Mary in order to maintain the patriarchal structure of the genealogy.[25] D. A. Carson calls this reading "painfully artificial" and would not likely be deduced by readers.[26] Likewise R. P. Nettelhorst calls this reading "unnatural and forced.[27] There are other interpretations of how this qualification relates to the rest of the genealogy. Some see the remainder as the true genealogy of Joseph, despite the different genealogy given in Matthew.[28]
The Church Fathers held that both accounts are true. Eusebius of Cesarea, in his Church history, dedicates the 7th chapter of the first book to that issue, arguing that the divergences are based on whether one is considered as being father by nature or by law. Similarly, in his book An Exact Exposition of the Orthodox Faith, John Damascene argues that Heli of the tribe of Nathan died childless, and Jacob of the tribe of Solomon took his wife and raised up seed to his brother and begat Joseph, in accordance with scripture, namely, yibbum (the mitzvah that a man must marry his brother's childless widow); Joseph, therefore, is by nature the son of Jacob, of the line of Solomon, but by law he is the son of Heli of the line of Nathan.[29]
(see the link for further divergence comments)
You further will see
Maternal ancestry in Luke
Maternal ancestry in Matthew
Lukan version of Levirate marriage theory
Panther
Legal inheritance
And more.