Isiah 14:21
Prepare slaughter for his children for the iniquity of their fathers; that they do not rise, nor possess the land, nor fill the face of the world with cities.
Leviticus 26:39
And they that are left of you shall pine away in their iniquity in your enemies' lands; and also in the iniquities of their fathers shall they pine away with them.
Exodus 20:5
You shall not bow down to them or worship them; for I, the LORD your God, am a jealous God, punishing the children for the sin of the parents to the third and fourth generation of those who hate me,
There are contradictions in the bible. And this is one of the most glaring and undeniable ones.
The 14th chapter of Isaiah is dealing against the king of Babylon and Babylon's overthrow. Isaiah 14:21 is the orders of the conquering Medes and Persians. They are the ' you men ' preparing for the ' sons ' ( Not minor children ). The fall of Babylon would be permanent. In other words, the Babylonian dynasty would be rooted out forever. Future generations of Babylon would suffer because of the error their father's made. They would suffer the bad consequences made by their fathers. That prideful spirit found in Babylon is a reflection of Satan's pride causing suffering for the ' sons ' of mankind.
Lev. 26:39 is giving the result or bad consequences for disobedience. The iniquities or lawlessness of their fathers would pine away or rot away with the fathers. In other words, the sons or future generations would Not pine or rot away because of the errors of the fathers. In the iniquities of their fathers shall the father's iniquities pine or rot away with the fathers.
Exodus 20:5 the 3rd or 4th generations as in meaning the troubles that the father's caused could or would affect not only children but grand or great-grand children. Not that God caused the trouble, but disobeying God was causing the troubles. Also please notice that would not go on through all generations. Remember Jesus will undo all the troubles caused by all nations - Rev. 22:2