I think this has been discussed before but I'll open the topic again and perhaps some good discussion will come of it. The geneologies of Matt and Luke are not to be taken as historical. This should have been obvious to us by simply comparing the two but anyway that's water under the bridge. Matt was working with some sort of 14 x 3 pattern whereas Luke may have been influenced by 1 Enoch.
And the Lord said to [the arch-angel] Raphael: 'Bind [the rebel] Azazel hand and foot and throw him into the darkness!' And Raphael made a hole in the desert, which was in Dudael, and cast him there. On top of him, he threw rugged and sharp rocks. And he covered Azazel's face in order that he may not see light and [...] may be sent into the fire on the great day of judgment. [...] And to Michael the Lord said: '[...] Bind them for seventy generations underneath the rocks of the ground until the day of their judgment is concluded.' [1 Enoch 10.4-6, 11-12]
1 Enoch linked the judgment with the Messiah figure called 'son of man'. A Christian writer (origianl author or later interpolator) could hardly have not seen the opportunity.
Enoch was called the seventh generation from Adam making 77 generations from Adam to the judgement by the 'son of man'. It seems likely that Luke with his 77 generations from Adam to Jesus was drawing from this tradition.