http://www.usccb.org/bible/matthew/1
The genealogical structure is detached from the rest of the tradition of Matthew's community. The footnotes as to the reason David precedes Abraham is simply unfamiliarity with these mathematical structures as is the omission of one generation in the last section which refers to the Babylonian exile to which this structure and the Genesis genealogy are related.
The genealogy in Matthew is a Rosetta Stone for something else