Matt 1 vs 6 says Solomon was in Christ's genealogy, whereas Luke 3 vs 31 says Nathan was. Nathan and Solomon were both sons of Bathsheba and David (1 Chron 3 vs 4-9).
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.