How can a person prepare for a negative change of fortune?
(30,12) “When you take the sum of the children of Yisrael according to their numbers, each one shall give (ונתנו) an atonement for his soul to Hashem when they are counted.”
Behold, the cantillation notes on the word ונתנו are קדמא ואזלא, which means "precede and go". We can explain that they come to allude to the teaching of Chazal in Shabbos 151b - “Said R. Chiya to his wife: When a poor person comes be quick to give him bread, so that others may be quick to bring to your children. She responded: Surely you are cursing them! He replied: It is a wheel which revolves in the world.”
Now, the word ונתנו reads the same forwards and backwards, because someone who gives sometimes needs to be given to by others, G-d forbid. This is what the Torah is alluding to with these notes - precede quickly to bring bread to a poor person in order that others will precede quickly to bring to your children. קדמא - therefore be quick and give him, ואזלא - and have the mitzvah of giving charity go before you, before the wheel of fortune changes for your children.
What is the maximum amount of charity that even a rich person should give?
(30,15) “The rich shall not give more, and the poor shall not give less.”
Behold, the cantillation notes on the words “the rich shall not give more” are מונח רביעי, which means "leave four". We can explain that this comes to allude to the teaching of Chazal in Kesuvos 50a - “One who is lavish in his giving of charity should not give more than a fifth of his wealth”.
This is the allusion of מונח רביעי, that even a rich person should give more than a fifth. He should leave four parts for himself, and give away the fifth part.
How do these posukim allude to the law of what one should do if he forgets which day is Shabbos?
(31,16) “And the Children of Yisrael shall keep Shabbos, to observe Shabbos throughout their generations as a perpetual covenant (ברית עולם). Between Me and the Children of Yisrael it is a sign for ever (לעלם), that in six days Hashem made the heavens and the earth, and on the seventh day He ceased from work and rested.”
Why in the first posuk does the Torah write ברית עולם with a letter 'vav', but in the second posuk it writes לעלם without a letter 'vav'? We can explain that it is coming to allude to the teaching of the gemora Shabbos 69b - “R. Huna taught that one who is travelling and does not know which day is Shabbos should count six days and observe the seventh day as Shabbos. But Chiya bar Rav said that he should first observe a day as Shabbos and then count six days.” The gemora explains that the first opinion held that he should conduct himself like the creation of the world where the six weekdays were enumerated first, and the other held that he should conduct himself like Adam HaRishon, who was created on the eve of Shabbos and thus first observed Shabbos and then counted the six weekdays.
Now, the halachah is according to R. Huna that one should first count six days and then observe a day of Shabbbos, and we can explain that the Torah alluded to this law in our posuk, and therefore the word לעלם is written without a 'vav' to hint to a secondary meaning of hiddenness. This is to similar to the teaching of Chazal in the gemora Pesachim 50a that the posuk in Shemos (3,15) “this is my name for ever (לעלם)” hints at an instruction to keep Hashem’s name hidden and not mention it in vain.
Thus our posuk is hinting that if the day of Shabbos becomes hidden, nevertheless, first “in six days Hashem made the heavens and the earth”, and then “on the seventh day He rested” - he should conduct himself like the creation of the world and first count six days, like the opinion of R. Huna.
Why were three thousand men killed because of the sin of the golden calf?
(32,28) “And the sons of Levi did according to the word of Moshe, and there fell from the people that day three thousand men.”
The Midrash comments that our posuk is explained by the posuk in Shemos (21,37) “five cattle he shall pay for the ox”. This Midrash is a puzzle.
But we can explain it according to the Midrash on the posuk in Koheles (7,28) “one man out of a thousand I found” - who sinned with the golden calf, “but a woman among all these (אלה) I did not find” - not a single woman was involved in the sin of “these (אלה) are your gods, Yisrael” (Shemos 32,4), because the women were upright and did not sin with the golden calf.
Because of this the Midrash on our posuk had a difficulty - since Hashem pays measure for measure and there were 600,000 men in the wilderness, one out of a thousand means that only 600 men sinned, so why did three thousand men die? This is what the Midrash answered by bringing the posuk “five cattle he shall pay for the ox”, that since Yisrael blemished the ox which is on the Divine Chariot, as the Midrashim explain, they have to repay five-fold, and five times 600 is exactly three thousand men. Therefore, our posuk says that “there fell from the people that day three thousand men”.