New American Standard Bible (NASB)
Genesis 37
35 Then all his sons and all his daughters arose to comfort him, but he refused to be comforted. And he said, "Surely I will go down to Sheol in mourning for my son." So his father wept for him.
36 Meanwhile, the Midianites sold him in Egypt to Potiphar, Pharaoh’s officer, the captain of the bodyguard.
Genesis 38
1 And it came about at that time, that Judah departed from his brothers and visited a certain Adullamite, whose name was Hirah.
2 Judah saw there a daughter of a certain Canaanite whose name was Shua; and he took her and went in to her.
3 So she conceived and bore a son and he named him Er.
4 Then she conceived again and bore a son and named him Onan.
5 She bore still another son and named him Shelah; and it was at Chezib that she bore him.
6 Now Judah took a wife for Er his firstborn, and her name was Tamar.
7 But Er, Judah’s firstborn, was evil in the sight of the Lord, so the Lord took his life.
8 Then Judah said to Onan, "Go in to your brother’s wife, and perform your duty as a brother-in-law to her, and raise up offspring for your brother."
9 Onan knew that the offspring would not be his; so when he went in to his brother’s wife, he wasted his seed on the ground in order not to give offspring to his brother.