"Perhaps there are fifty righteous ones." And why did he open with fifty? Because there were five towns, so that there would be for each and every one ten righteous ones. And because in the generation of the Flood there were eight — Noah and his wife and his three sons and their three wives, behold, eight — and they were not able to save them; for this reason he said, "If I find in Sodom fifty righteous ones," and so forth.
Why Abraham Began His Plea for Sodom at Fifty Righteous
Midrash Aggadah, Genesis 18:24
אולי יש חמשים צדיקים. ולמה פתח בחמשים, לפי שהיו חמשה עיירות, כדי שתהא לכל אחת ואחת עשרה צדיקים, ולפי שבדור המבול היו שמונה נח ואשתו ושלשת בניו ושלשת נשותיהם הרי שמונה ולא יכלו להצילם בעבור זה אמר אם אמצא בסדום חמשים צדיקים וגו':