The Talmud
ברכות דף נ״הBerachot 55b
Amud b of Berachot 55 — the second side of the page
English rendering prepared for The Gematria — not a historical translation.
Berakhot 55b · ברכות נ״ה ב
וההיא שעתא אמיה לא הות
and at that hour his mother was no longer alive.
אמר א"ר לוי לעולם יצפה אדם לחלום טוב עד כ"ב שנה מנלן מיוסף דכתיב (בראשית לז, ב) אלה תולדות יעקב יוסף בן שבע עשרה שנה וגו' וכתיב (בראשית מא, מו) ויוסף בן שלשים שנה בעמדו לפני פרעה וגו' מן שבסרי עד תלתין כמה הוי תלת סרי ושב דשבעא ותרתי דכפנא הא כ"ב
Rabbi Levi said: a man should always look forward to a good dream up to twenty-two years. From where do we have it? From Yosef, as it is written "these are the generations of Yaakov: Yosef, being seventeen years old" (Genesis 37:2), and it is written "and Yosef was thirty years old when he stood before Pharaoh" (Genesis 41:46). From seventeen to thirty, how much is it? Thirteen; and seven of plenty and two of famine — that is twenty-two.
אמר רב הונא לאדם טוב אין מראין לו חלום טוב ולאדם רע אין מראין לו חלום רע
Rav Huna said: to a good man they do not show a good dream, and to a bad man they do not show a bad dream.
תניא נמי הכי כל שנותיו של דוד לא ראה חלום טוב וכל שנותיו של אחיתופל לא ראה חלום רע
It was also taught thus: in all David's years he never saw a good dream, and in all Achitofel's years he never saw a bad dream.
Talmud Bavli, Wikisource edition, via Sefaria — CC BY-SA 4.0. English rendering prepared for The Gematria — not a historical translation.