As I meditated on the differences between the Matthaean and Lukan accounts of the genealogy of Jesus, I came across this rather intriguing analysis, "Who was Jesus' Grandfather?", on what looks to be an Evangelical web site. Although the details are highly dubious, the theorizing is highly intriguing.
I should say the same for another theory I ran across in my meandering on the web, that the genealogy given in Luke is actually Mary's not Joseph's ancestry. It is this theory that the above analysis draws upon for support.
By contrast, the Jerome Biblical Commentary gives numerological explanations. Also quite speculative in nature, but seemingly well supported by their simple calculations.
It would be easy to obsess over such differences in the Matthaean and Lukan accounts. The reason I bring up these speculations is that there are far too many possibilities to say that one or the other account must be wrong, or even that they definitively disagree.