Exodus 20:5
3 “You shall have no other gods before me. 4 “You shall not make for yourself a carved image or any likeness of anything that is in heaven above or that is on the earth beneath or that is in the water below. 5 You shall not bow down to them or serve them, for I, the Lord, your God, am a jealous God, responding to the transgression of fathers by dealing with children to the third and fourth generations of those who reject me, 6 and showing covenant faithfulness to a thousand generations of those who love me and keep my commandments. 7 “You shall not take the name of the Lord your God in vain, for the Lord will not hold guiltless anyone who takes his name in vain.
Jeremiah 2:9
7 I brought you into a fertile land so you could enjoy its fruits and its rich bounty. But when you entered my land, you defiled it; you made the land I call my own loathsome to me. 8 Your priests did not ask, ‘Where is the Lord?’ Those responsible for teaching my law did not really know me. Your rulers rebelled against me. Your prophets prophesied in the name of the god Baal. They all worshiped idols that could not help them. 9 “So, once more I will state my case against you,” says the Lord. “I will also state it against your children and grandchildren. 10 Go west across the sea to the coasts of Cyprus and see. Send someone east to Kedar and have them look carefully. See if such a thing as this has ever happened: 11 Has a nation ever changed its gods (even though they are not really gods at all)? But my people have exchanged me, their glorious God, for a god that cannot help them at all!
Notes and References
"... God as clear-sighted judge is the more dominant theme in this context and the point is expressed in two ways in verses 18-19. First, using language similar to Exodus 20:5 / Deuteronomy 5:9, Jeremiah speaks of God completing (“repay” is used in Exodus / Deuteronomy) the iniquity of the parents upon the (laps of) the children, that is, seeing that the moral order comes full circle in terms of sin’s effects (see Isaiah 65:6-7). On salêm in this sense of correspondence between deed and consequence in Jeremiah, see 50:29, “repay her according to her deeds; just as she has done, do to her” (compare 16:18; 25:14) ..."
Fretheim, Terence E. The Smyth & Helwys Bible Commentary: Jeremiah (pp. 461-462) Smith & Helwys, 2002