"Build me here seven altars" (Numbers 23:1) — corresponding to those that the first fathers built, from Adam until Moses our teacher. And these are they: Adam the first man built an altar, as it is said, "And it shall please the LORD better than a bull, than an ox" (Psalms 69:32). And Noah also built an altar, as it is said, "And Noah built an altar to the LORD" (Genesis 8:20). And Abraham built an altar, and Isaac built an altar, and Jacob built an altar, [as it is written, "And he built there an altar,"] "and he called the place El-beth-el" (there, 35:7). Behold, seven altars that the first ones built. [Balaam reasoned:] Perhaps He will show me favor and let me be.
Why Balaam Demanded Seven Altars From Balak
Midrash Aggadah, Numbers 23:1
בנה לי בזה שבעה מזבחות. שבנו אבות הראשונים מאדם ועד משה רבינו, ואלו הם אדם הראשון בנה מזבח, שנאמר ותיטב לה' משור פר (תהלים סט לב), וגם נח בנה מזבח, שנאמר ויבן נח מזבח לה' (בראשית ח כ), ואברהם בנה מזבח, ויצחק בנה מזבח, ויעקב בנה מזבח, [דכתיב ויבן שם מזבח] ויקרא למקום אל בית אל (שם לה ז), הרי שבעה מזבחות שבנו הראשונים, אולי ישא לי פנים ויניחני: