Formation of the Elements: Nucleosynthesis