Deuteronomy 21:16-17

BSB(i) 16 when that man assigns his inheritance to his sons he must not appoint the son of the beloved wife as the firstborn over the son of the unloved wife. 17 Instead, he must acknowledge the firstborn, the son of his unloved wife, by giving him a double portion of all that he has. For that son is the firstfruits of his father’s strength; the right of the firstborn belongs to him.