Onan was the second son of Judah. When the first son, Er/Ehr, died without children, Onan, the second son, married Tamar, who was Er's wife, according to the custom of the time. Any child born from this union would inherit the portion of the first son, Er. Onan, disliking this, spilled his seed on the ground, and this act was evil in the sight of God, so he died.
Genesis 38:4She yet again bore a son, and named him Shelah. He was at Chezib when she bore him.Genesis 38:5Judah took a wife for Er, his firstborn, and her name was Tamar.Genesis 38:6Er, Judah’s firstborn, was wicked in Yahweh’s sight. So Yahweh killed him.Genesis 38:7Judah said to Onan, “Go in to your brother’s wife, and perform the duty of a husband’s brother to her, and raise up offspring for your brother.”Genesis 38:8Onan knew that the offspring wouldn’t be his; and when he went in to his brother’s wife, he spilled his semen on the ground, lest he should give offspring to his brother.Genesis 38:9The thing which he did was evil in Yahweh’s sight, and he killed him also.
Genesis 46:12The sons of Issachar: Tola, Puvah, Iob, and Shimron.
Numbers 26:19The sons of Judah after their families were: of Shelah, the family of the Shelanites; of Perez, the family of the Perezites; of Zerah, the family of the Zerahites.
1 Chronicles 2:3Tamar his daughter-in-law bore him Perez and Zerah. All the sons of Judah were five.