Deuteronomy 5:9-10 NIV

9 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 fathers1 to the third and fourth generation of those who hate me,2

References for Deuteronomy 5:9

10 but showing love to a thousand3 [ generations] of those who love me and keep my commandments.4

References for Deuteronomy 5:10