Jacob's account ends at Genesis 37:2. From here through the end of Genesis is the account of the sons of Israel (Exodus 1:1). The records of Israel's sons begin when Joseph is 17 less than two years after Jacob moves his family to Hebron and before Isaac dies. This makes the account slightly out of chronological order in regards to Jacob's account, but then we have changed sources for the records.
By the time Joseph was 17, his older brothers, Reuben, Simeon, Levi, and Judah, have married and started their own families. Joseph spent most of his time with Bilhah and Zilpah's sons who were closer to his own age.
As we read through the account, we find that Joseph did not get along well with his brothers. Jacob was already disappointed with his eldest sons. Reuben had committed fornication with Jacob's concubine, Bilhah. Simeon and Levi had slaughtered a town against Jacob's desire. Now we find Joseph bringing Jacob reports that Bilhah and Zilpah's sons were not acting properly while caring for Jacob's flocks. Joseph's report was true, but his report to Jacob did not endear him to his brothers.
Jacob himself did not help matters either. He clearly favored Joseph over his other sons. Jacob gave Joseph a special coat one more suitable for an overseer than for someone expected to labor. The meaning of the word which is sometimes translated "many colored" is debated. Some translators now believe that it should be translated "long-sleeved" or "full-length." In addition to favoring his son with special gifts, Jacob also referred to Joseph as his son of old age. In Hebrew this same phrase can mean his wise son. In other words, Jacob thought Joseph was wiser than his other sons. Joseph's brothers were so angry at this favoritism that they could not bring themselves to speak civilly with Joseph.
As if this wasn't enough, Joseph had a series of dreams. There were at least two dreams and possibly a third dream the first dream not being recorded. There was nothing to indicate to the family that these dreams were actually from God. From their view, he could have been making them up to seem important. Even so, the very fact that Joseph was having dreams from God angered the brothers because it once again showed Joseph receiving special favors. The first recorded dream involved sheaves of wheat which the brothers were gathering. In the dream, Joseph's sheaf rose tall and upright and his brother's sheaves bowed before Joseph's sheaf. The meaning of the dream was obvious to everyone who heard the dream. The dream indicated that one day Joseph would rule over his brothers. Given his brothers' anger with him, Joseph probably should have used some tact in telling his dream. Perhaps he should have kept the dream to himself, at least until his brothers had calmed down. However, he told everyone and the brothers hatred for Joseph grew stronger.
Soon after, Joseph had another dream. This one involved the sun, moon, and eleven stars bowing down to Joseph. It seems obvious that the sun represented Jacob, the moon is Leah (Rachel is dead by this time), and the stars are Joseph's brothers. Once again Joseph tells his family about his dream. He didn't learn from the reception his prior dream received. You get the impression that Joseph lauds the dream over his family, telling them his dream repeatedly. Even Jacob sharply rebukes Joseph for what he said. Again, this incident fans the flames of the brothers' jealousy of Joseph further.
Although the family is located near Hebron, where there should be adequate pastures for Jacob's flocks, the eldest ten brothers move the animals under their care all the way up to Shechem, which is over 50 miles away. Perhaps they were avoiding their family problems. Eventually, Jacob wants to know how his sons and his flocks are getting along, so he sends Joseph to find out. Don't forget that Joseph had previously brought Jacob a bad report concerning four of his brothers.
When Joseph arrives in Shechem, he was unable to locate his brothers or his father's herds. While wandering in the fields, a man asks Joseph what he is looking for. We must remember that Joseph's brothers are notorious in the region since Simeon and Levi wiped out the town of Shechem. When Joseph stated he was searching for his brothers, the man knew who they were and mentioned hearing they planned on moving the herds to Dothan. Dothan is 20 miles farther north of Shechem.
So here comes Joseph, the tattler and master of dreams, approaching his brothers in a spot they were not suppose to be with their father's flocks. The brothers see Joseph well in advance of his arrival. His special coat was probably very noticeable, even from a distance. Before Joseph came close, they had a scheme laid to kill him and leave his body in one of the many nearby dry-wells. They would tell Jacob that some wild animal had killed Joseph and had eaten his body. However, Reuben talks them out of executing their plan. As the eldest son, he is responsible for the safety and well-being of Jacob's children. He gets them to agree to only put Joseph down into a dry well. Reuben secretly planned on rescuing Joseph later and would see that Joseph returned safely to Jacob.
The brothers agree to Reuben's compromise. As Joseph walks up, they seize him and strip off his special coat symbolically stripping Joseph of his privileges and place him in a pit. They then sit down to eat and Reuben apparently goes off, perhaps to check on the flocks. While Reuben is gone, a caravan of Ishmaelite and Midianite traders pass by. Judah sees them and has a bright idea. If they sell Joseph to the traders, they could be rid of Joseph and make a profit in the deal. It may be that Judah did this to save Joseph's life. It seems certain that the other brothers still wanted Joseph dead. Judah had to persuade them to go along with his plan.
Despite Joseph's pleadings (Genesis 42:21), they bargained with the Midianites and settled on a price of twenty pieces of silver. This price latter becomes significant in the Law of Moses. Twenty pieces of silver is the price that had to be paid for the dedication of a young man or a boy (Leviticus 27:5). The price of a mature male slave was set at thirty pieces of silver (Exodus 21:32).
Reuben, not knowing what had transpired, waits until the brothers leave the area and then returns to rescue Joseph. However, he discovers that Joseph is gone. The full impact of his problem in explaining the disappearance of Joseph hits Reuben and he tears his clothes in grief. He doesn't know which way to turn. However, his brothers know what to do. They decide to make Joseph's disappearance look like an accidental death. They smear goats' blood on Joseph's coat and send it to Jacob. They simply say they found the coat, but they don't say where it was found. By not being there when the coat is delivered, their father would be less likely to spot the lie. Jacob leaps to the natural conclusion that Joseph was eaten by a wild animal. He mourns for his favorite son for a long time.
Meanwhile, Joseph is sold to an Egyptian named Potiphar. He is an officer on Pharaoh's staff. The Hebrew word for officer literally means eunuch. It was customary to castrate men who served Pharaoh to eliminate any thoughts of overthrowing the king and establishing their own dynasty. Potiphar's duty to Pharaoh was captain of the guard. Again, we learn more from the Hebrew. The phrase literally means captain of the executioners.
The time period between chapter 37 and chapter 47 is 22 years. Chapter 38 appears to take place somewhere in this time frame. However, since Genesis 46:12 mentions Perez, Judah's son by Tamar, having two sons it is more likely that the events in chapter 37 began prior to Joseph's problems and finished before the family moved to Egypt.
Judah leaves home and settles near the town of Adullam, which is northwest of Hebron. There he becomes friends with a native of the area named Hirah. While visiting with Hirah, Judah meets the daughter of a Canaanite man name Shua, whom he marries. Some wonder why Jacob's sons do not return to Haran for wives as their forefathers had done. The obvious reason is due to the dispute between Jacob and Laban. Also, since Laban's family has been moving into idolatry, the possibility of finding a wife there who believes in the one true God has become near impossible. Judah and Shua have three children. Their first born was named Er by Judah, which means "watcher." Their second son was named Onan by his wife, which means "strong." Their third and last son was named Shelah by Judah's wife, which means "request." By this time Judah and his family had moved to Chezib, a small town near Adullam. Judah arranges a marriage for Er to a woman named Tamar. Due to the time frame between chapters 37 and 47, we must conclude that Er was only in his late teens at the time of his marriage to Tamar. Notice that while Judah picked his own wife, Judah chooses Er's wife for his son.
We don't know what sin Er had committed, but shortly after his marriage God slew Er for his wickedness. At the time of his death, he and Tamar were childless. As was the custom in those days, Tamar was given to Er's brother as a wife. Their first son would be considered Er's son and would receive the double portion of inheritance from Judah at Judah's death (Deuteronomy 24:5-10, Matthew 22:24). In other words, one-half of Judah's estate would go the first son of Onan and Tamar. Onan and his brother would only inherit one-fourth of Judah's estate. Onan knew that without a son, the double portion would fall to him. In other words, Onan stood to inherit two-thirds of Judah's estate if he and Tamar did not have a son. Therefore, when he went to have sex with Tamar, he purposely withdrew and spilled his semen on the ground. For this sin, God slew Onan. Notice that Onan was not killed for masturbating as is commonly stated. His sin before God was refusing to give a child to his brother's name.
The proper thing to do after the death of Onan would have been to give Tamar to Shelah as his wife. However, after having two sons die right after marrying Tamar, Judah was obviously reluctant to experiment with his last son. Since Shelah was too young to marry and have children, Judah sent Tamar back to her father until Shelah grew to manhood. During this time, Judah's wife dies at a young age. She was probably less than 40 years old. Over the years, Judah conveniently forgets about Tamar, even though Shelah has now grown into a man. Tamar's chances of finding another husband are basically nil. After all, who would marry a woman whose first two husbands died soon after the marriage ceremony?
After a period of time, it became obvious to Tamar that Judah had no intentions of marrying her to Shelah. Tamar hears that Judah is tending his sheep near Timnah, another town in the Adullam area. Tamar dressed up as a temple prostitute whose outfit included a veil to hide her face. She waited by the road near Enaim until Judah approached. Judah saw her and decided to have sex with the prostitute. The payment agreed on was a baby goat, but not having one with him, Judah gives Tamar his seal, including the cords which strapped the seal to him, and his staff. The unbroken cord would show the seal was freely given and not forcibly stolen from Judah. After Judah returned home, he sent his payment by his friend, Hirah. However, Hirah could not find the woman. When he inquired in the town, Hirah learned that no temple prostitute was known to work in the area. After reporting these things to Judah, Judah decides to let the matter drop. He did not want word to get out that he had visited a prostitute.
Three months later, Judah is told that Tamar is pregnant. Obviously this meant that Tamar had committed adultery. She was technically engaged to Shelah and engagements were viewed was equivalent to marriage. Judah orders her to death by burning. As she was brought out of the house, Tamar shows Judah the seal, cord, and staff and announces in public that the owner of these items was the man responsible for her condition. Judah recognizes the items as his own. Now what can he say? What Tamar had done was wrong but not a greater sin than his own. Neither can he fault her reason for doing this evil, because Judah had not fulfilled his obligations by giving Tamar to Shelah for a wife. The fault of this sin laid with him. By declaring Tamar righteous, Judah is not saying she was without fault, but rather he saw his own sins were worse than hers. However, notice that Judah does not take Tamar as his own wife; though, her children are counted as his own.
Twin boys came about from this union. At their birth, one arm of the children came out and the midwife tied a red cord on the wrist to mark the child as the firstborn. However, the arm is withdrawn in the womb and the other child was delivered first. The firstborn son was named Perez, which means "breaking through." The second son, who had the scarlet cord, was named Zerah, which means "dawning." Perez is the ancestor of David and the Christ.
Interestingly, Tamar is one of four women named in Matthew's lineage of the Christ in Matthew 1. Notice that all four women in Matthew's lineage are not Hebrews.