When discussing the practice of Ashkenazim to begin reciting selichos on Motzei Shabbos, the Leket Yosher cites an interesting midrash. When Klal Yisrael entered Eretz Yisrael, the Torah dressed in sackcloth and cried out to Hashem. While in the wilderness her needs were taken care of but now that Klal Yisrael was to begin their new lifestyle in Eretz Yisrael she was going to be cast away. In the wilderness Hashem had provided food, shelter, and clothing to His people; thus, there was sufficient time to learn. Now, the people would need to work for these basic necessities and the Torah was concerned that Klal Yisrael would not have time to learn.
The midrash teaches us that Hashem pacified the Torah by telling her that she was lonely and Shabbos was lonely and that the two would be paired up and provide comfort for each other. Klal Yisrael has to refrain from working on this holy day and they would have time to study Torah. Therefore, on Motzei Shabbos, everyone is happy after a long day of learning productively.
The Maharal, and others, often mention that this world has a natural order of sevens. Therefore, often this number is used to symbolize a complete natural existence. If we assign a numerical value to each day of the week then every day has a pair that allows it to reach this completion. Sunday is the first day and therefore designated as being valued at one. When paired with the sixth day, Friday, they equal seven. Utilizing this system we see that the only day with no pair is Shabbos, thus allowing us to see that naturally it is a "lonely day."
This famous numerical pairing is only half of the picture, though. Each day of the week is assigned a celestial body that is considered to be the sign of that day. The seven days of the week (in order from Sunday) align with the sun, moon, Mars, Mercury, Jupiter, Venus, and Saturn. Additionally, Chazal expressed the construct of the cosmos as being similar to an onion. From the perspective of mankind, the planets and stars appear to circle around our planet. Earth is expressed as a core and these outer layers of orbits are similar to our onion's layers. There seven lowest orbits are those of the sun, moon, and the planets visible to the naked eye. These are the same objects assigned to the days of the week.
The first orbit is that of the moon and if we pair it with the sixth we find that it is paired with Jupiter. Interestingly, the moon goes with Monday which is the second day and its pair would be Thursday which is Jupiter; these are the exact same objects! The second orbit is that of Mercury and that needs to be paired with the fifth orbit to equal seven. This has us pairing Mercury with Mars. In the days of the week, Mercury is Wednesday (4) and it would therefore pair with Mars, Tuesday (3). The third orbit is that of Venus and pairs with the fourth which is the sun. Similarly, Sunday's sign is the sun (1) and that pairs with Venus which is designated as Friday's sign (6). (See Mishneh Torah Yesodai Hatorah 3:1 for the listing of orbits). The only planet left out is Saturn whose orbit is seven and whose day is Shabbos (7)! All the objects find the some object to pair with both when looking at the days of the week and the orbits of the associated planets!!! Shabbos was lonely and thus it is our job to make sure that she find her appropriate mate every week by utilizing this restful day to make time to learn Torah.