Genesis 6:19
18 but I will confirm my covenant with you. You will enter the ark—you, your sons, your wife, and your sons’ wives with you. 19 You must bring into the ark two of every kind of living creature from all flesh, male and female, to keep them alive with you. 20 Of the birds after their kinds, and of the cattle after their kinds, and of every creeping thing of the ground after its kind, two of every kind will come to you so you can keep them alive.
Genesis 7:2
1 The Lord said to Noah, “Come into the ark, you and all your household, for I consider you godly among this generation. 2 You must take with you seven pairs of every kind of clean animal, the male and its mate, two of every kind of unclean animal, the male and its mate, 3 and also seven pairs of every kind of bird in the sky, male and female, to preserve their offspring on the face of the entire earth. 4 For in seven days I will cause it to rain on the earth for 40 days and 40 nights, and I will wipe from the face of the ground every living thing that I have made.”
Notes and References
"... The number of animals on the ark is seven pairs of pure and one pair of impure in Genesis 7:2, 3 (J); but it is only one pair of each, whether pure or impure, in 6:19-20; 7:8-15 (P). This fits with the fact that in J Noah will offer sacrifices at the end of the flood, so he Needs more than two of each animal - or else his sacrifice would end a species. But in P, there are no sacrifices in the story until the establishment of the Tabernacle in Exodus 40, so two of each animal are sufficient ..."
Friedman, Richard Elliott The Bible with Sources Revealed: A New View Into the Five Books of Moses (p. 43) Harper San Francisco, 2005