Deuteronomy 21:17-22 New English Translation (NET)

17. Rather, he must acknowledge the son of the less loved wife as firstborn and give him the double portion of all he has, for that son is the beginning of his father’s procreative power – to him should go the right of the firstborn.

18. If a person has a stubborn, rebellious son who pays no attention to his father or mother, and they discipline him to no avail,

19. his father and mother must seize him and bring him to the elders at the gate of his city.

20. They must declare to the elders of his city, “Our son is stubborn and rebellious and pays no attention to what we say – he is a glutton and drunkard.”

21. Then all the men of his city must stone him to death. In this way you will purge out wickedness from among you, and all Israel will hear about it and be afraid.

22. If a person commits a sin punishable by death and is executed, and you hang the corpse on a tree,

Deuteronomy 21