Deuteronomy 8:2
1 You must keep carefully all these commandments I am giving you today so that you may live, increase in number, and go in and occupy the land that the Lord promised to your ancestors. 2 Remember the whole way by which he has brought you these 40 years through the wilderness so that he might, by humbling you, test you to see if you have it within you to keep his commandments or not. 3 So he humbled you by making you hungry and then feeding you with unfamiliar manna. He did this to teach you that humankind cannot live by bread alone, but also by everything that comes from the Lord’s mouth. 4 Your clothing did not wear out nor did your feet swell all these 40 years. 5 Be keenly aware that just as a parent disciplines his child, so the Lord your God disciplines you.
Matthew 4:1
1 Then Jesus was led by the Spirit into the wilderness to be tempted by the devil. 2 After he fasted 40 days and 40 nights he was famished. 3 The tempter came and said to him, “If you are the Son of God, command these stones to become bread.” 4 But he answered, “It is written, ‘Man does not live by bread alone, but by every word that comes from the mouth of God.’” 5 Then the devil took him to the holy city, had him stand on the highest point of the temple, 6 and said to him, “If you are the Son of God, throw yourself down. For it is written, ‘He will command his angels concerning you’ and ‘with their hands they will lift you up, so that you will not strike your foot against a stone.’”
Notes and References
"... Matthew 4:2 probably narrates Jesus being hungry to form a thematic association with the hunger theme in the unquoted half of Deuteronomy 8:3. Although Matthew 4 does not quote this part of Deuteronomy 8:3, there are good reasons for thinking that Matthew 4:2 alludes to it. First, Deuteronomy 8:1-5 and Matthew 4:1-3 share some identical words and a reference to the number 40. Second, the same themes are clustered together in both Deuteronomy 8 and Matt 4. Third, Deuteronomy 8:1-5 and Matt 4:1-4 describe analogous situations. Some identical words and the mention of the number 40 appear in Deuteronomy 8:1-5 and Matthew 4:1-3. The identical words include ἔρημος (“wilderness”) and υἱός (“son”). Deuteronomy 8:2 contains ἔρημος, and Matthew 4:1 uses ἔρημος. Deuteronomy 8:5 includes υἱός, and Matthew 4:3 contains υἱός. The number 40 appears in both Deuteronomy 8:4 and Matthew 4:2. Deuteronomy 8:4 mentions 40 years, and Matthew 4:2 references 40 days and 40 nights. The above details lead many scholars to conclude that the quotation of Deuteronomy 8:3 in Matt 4:4 alludes to Deuteronomy 8:1-5 ..."
Winchester, Christopher Thematic Association in the Gospel of Matthew: Situating Exegesis in the Gospel of Matthew in its Second Temple Context (p. 216) University of Edinburgh, 2017