Genesis 37:35-36 New King James Version (NKJV)

35. And all his sons and all his daughters arose to comfort him; but he refused to be comforted, and he said, “For I shall go down into the grave to my son in mourning.” Thus his father wept for him.

36. Now the Midianites had sold him in Egypt to Potiphar, an officer of Pharaoh and captain of the guard.

Genesis 37