Deuteronomy 21:15-17

The Right of the Firstborn

15 "If a man has two wives, one loved and the other unloved, and both the loved and the unloved bear him sons, and if the unloved wife has the firstborn son,
16 when that man gives what he has to his sons as an inheritance, he is not to show favoritism to the son of the loved [wife] as his firstborn over the firstborn of the unloved wife.
17 He must acknowledge the firstborn, the son of the unloved wife, by giving him a double portion of everything that belongs to him, for he is the firstfruits of his virility; he has the rights of the firstborn.[a]

Footnotes 1

Holman Christian Standard Bible ® Copyright © 2003, 2002, 2000, 1999 by Holman Bible Publishers.  Used by permission.  All rights reserved.