Devarim16:15

שִׁבְעַת יָמִים תָּחֹג לַיהוָה אֱלֹהֶיךָ בַּמָּקוֹם אֲשֶׁר־יִבְחַר יְהוָה כִּי יְבָרֶכְךָ יְהוָה אֱלֹהֶיךָ בְּכֹל תְּבוּאָתְךָ וּבְכֹל מַעֲשֵׂה יָדֶיךָ וְהָיִיתָ אַךְ שָׂמֵחַ׃

Seven days you shall keep the festival to the Eternal your Almighty in the place that the Eternal will choose, for the Eternal your Almighty will bless you in all your yield and in all the work of your hands, and you shall be altogether joyful.

Devarim 16:15

שִׁבְעַת יָמִים תָּחֹג

Devarim / Deuteronomy 16:15 · Remez

Devarim 16:15

שִׁבְעַת יָמִים תָּחֹג לַיהוָה אֱלֹהֶיךָ בַּמָּקוֹם אֲשֶׁר־יִבְחַר יְהוָה כִּי יְבָרֶכְךָ יְהוָה אֱלֹהֶיךָ בְּכֹל תְּבוּאָתְךָ וּבְכֹל מַעֲשֵׂה יָדֶיךָ וְהָיִיתָ אַךְ שָׂמֵחַ׃

Seven days you shall keep the festival to the Eternal your Almighty in the place that the Eternal will choose, for the Eternal your Almighty will bless you in all your yield and in all the work of your hands, and you shall be altogether joyful.

Remez רֶמֶז

Twenty-one

Why is joy said three times of one festival in the Torah, once of another, and never of the third? The sages count the joys and the letters.

Rosh: three joys are said of Sukkot, one of Shavuot, none of Pesach. On Pesach neither fruit nor grain is gathered, on Shavuot the fruit is, and on Sukkot everything is, and the joy is complete. And the word אַךְ ("only") has the numerical value 21, the number of days when the full Hallel is read. Sefat Emet: אַךְ = 21, like אֶהְיֶה ("I will be"). Shavuot and Shemini Atzeret have no commandment of deed of their own, they are above nature, and one cleaves to them through the Torah.

How Rosh and Sefat Emet explain it

Rosh And you shall be altogether joyful

Of Sukkot three joys are written: "And you shall rejoice in your festival" (Devarim / Deuteronomy 16:14), "altogether joyful", and "And you shall rejoice before the Eternal your Almighty" in the portion Emor (Vayikra / Leviticus 23:40). And of Shavuot only one is written, and of Pesach there is no joy at all. Because on Pesach neither the fruit nor the grain has been gathered yet. And on Shavuot the fruit has already been gathered, and there is one joy, for the grain has not yet been gathered and brought into the house. But on the festival of Booths (Sukkot) there is everything: the fruit and the grain are gathered and everything is brought into the house. Then the joy is complete, and so three joys are written of it. "Altogether (אַךְ) joyful": its numerical value is the days of reading the Hallel, twenty-one days.

Sefat Emet And you shall be altogether joyful, to include the night of the last festival day and so on

It is as said above: by keeping the days of the festival properly, it is a promise that they will have a bond to rejoice also on the eighth day, which is above nature, as said above. [And see what is written above: "only" excludes the nations. Also אַךְ in numerical value equals אֶהְיֶה, and there "You shall surely send away the mother" and so on, "but the young you may take".]

And behold, in every festival there is a special commandment: matzah on Pesach, the booth and the four species on Sukkot. Except Shavuot and Shemini Atzeret: in them there is no commandment, apart from the additional offerings that were in the Temple. And the matter is that these two festivals are from the upper world, and one does not cleave to them through commandments of deed. Therefore the counsel is through the Torah: on Shavuot, the time of the giving of our Torah, and on Shemini Atzeret, the joy of the Oral Torah. Through the Torah one can cleave also to what is above nature. This is what is said: "The Torah is perfect, restoring the soul" (Tehillim / Psalms 19:8): in this world, in exile, we have nothing to cleave to on these festivals except through this Torah.

Takeaway

Numerical value of letters: אַךְ = א 1 + ך 20 = 21. אֶהְיֶה = א 1 + ה 5 + י 10 + ה 5 = 21. The count is checked.
Twenty-one days of full Hallel are outside the Land of Israel: eight days of Chanukah, nine days of Sukkot with Shemini Atzeret and Simchat Torah, two days of Pesach and two of Shavuot. In the Land of Israel there are eighteen such days (Arakhin 10a).
Hallel (הַלֵּל) is the psalms of praise (Tehillim / Psalms 113–118) recited on festivals.
"Send away the mother, but the young you may take" (Devarim / Deuteronomy 22:7) is the verse about the nest. The Sefat Emet only points to the link and does not unfold it.