Here in the Book of Psalms is found an abstract of the books of Exodus and Numbers.
Psalm 77, attributed to Asaph, mentions on verses 19-20 Moses and Aaron and the parting of the Red Sea (Exodus 14:21-29).
Psalm 78, attributed to Asaph, recalls the parting of the Red Sea, the pillar of cloud in the desert (Exodus 13:21-22) the provision of water out of a rock at Horeb (Exodus 17:1-6, Numbers 20:11) the provision of manna (Exodus 16:13-19) the provision of quail (Exodus 16:11-13) the plague visited on the Israelites after they grumbled for meat (Numbers 11:32-33) and the plagues of Egypt. The psalm also takes on the First Book of Samuel: God's rejection of the tabernacle at Shiloh (1 Samuel 4:1-11) and the choosing of David his servant (1 Samuel 16:1-13). Psalm 78:65-72 testify that Asaph wrote Psalm 78 in part to eulogize David during the monarchy of Solomon.
Psalm 81, attributed to Asaph, cites "the waters of Meribah" (Numbers 20:1-13).
Verses 6-7 of Psalm 99 bundle Moses, Aaron and Samuel together and make the baffling remark that "they called on the Lord" and that "he spoke to them from the pillar of cloud." Either Samuel is a fictional character, like Moses and Aaron, or Samuel did exist and was the man whom Deuteronomy 18:15 pointed to, "The Lord your God will raise up for you a prophet like me from among your own brothers. You must listen to him."
Psalm 105 mentions Abraham, Isaac, Jacob, Joseph, Moses and Aaron, the plagues of Egypt, the pillar of cloud in the desert, the provision of quail, the provision of manna, the provision of water out of a rock at Horeb and the conquest of the Promised Land. It is almost certain that the ministry of prophesy supervised by David composed Psalm 105 because its verses 1-5 are identical to 1 Chronicles 16:8-12, because its verses 7-15 are identical to 1 Chronicles 16:14-22, and because 1 Chronicles 16:7 reveals that "David first appointed Asaph and his associates to give praise to the Lord in this manner."
Psalm 106 recalls the parting of the Red Sea, the demise of Dathan and Abiram (Numbers 16:1-35) the casting of a golden calf at Horeb (Exodus 32:1-6) the waters of Meribah (Numbers 20:1-13) and the response of Phinehas to the plague visited upon the Israelites for worshiping the Baal of Peor (Numbers 25:1-9). Once more the ministry of prophesy supervised by David almost certainly composed Psalm 106 because its verses 47-48 are identical to 1 Chronicles 16:35-36.
Verses 7-8 of Psalm 114 cite the provision of abundant water out of the rock at Horeb.
Psalms 135 and 136 mention the defeat of Sihon king of the Amorites, of Og king of Bashan and of "all the kings of Canaan" (Numbers 21:21-25, 21:33-35). The refrain of Psalm 136, "His love endures forever," hearkens back to David, Asaph and his associates (1 Chronicles 16:34).
Accordingly one may confidently assume that the primitive books of Genesis, Exodus and Numbers were written by King David together with his ministry of prophesy.
Psalm 83 mentions Sisera and Jabin (Judges 4:2) Oreb and Zeeb (Judges 7:25) Zebah and Zalmunna (Judges 8:5). The presence of Assyria among the nations listed on verses 5-8 suggests that Psalm 83, and by extension the Book of Judges, was written during or sometime after the monarchy of Hezekiah (2 Kings 18:13-14).
The following examples imply that many versions of Genesis, Exodus and Numbers were written.
A book of Moses could be altered without any pang of conscience because the various editors knew it to be religious literature, not historical fact.