The best source I found is the following:
Here is a small extract from this story:
"But, since his match with Thoth, Khensu the moon has not had enough
light to shine throughout the month, but dwindles into darkness and
then grows to his full glory again; for he had lost the light needed
to make five whole days.
On the first of these days Osiris, the eldest son of Nut, was born,
and the second day was set aside to be the birthday of Horus (the son
of Isis and Osiris). On the third day the second son of Nut was born,
dark Set, the lord of evil. On the fourth her daughter Isis first saw
the light, and her second daughter Nephthys on the fifth. In this way
the curse of Ra was both fulfilled and defeated: for the days on which
the children of Nut were born belonged to no year."
There are several other websites which deal with this story:
1. "Egypt Creation Myth"
"Then Geb and Nut married, which they were not allowed to do. Ra
ordered Shu to separate them, but Nut was already pregnant. Ra had
declared that Nut could not give birth on any day of any year. Toth,
the god of learning, decided to help her and gamble with the moon for
some extra days to the 360 day calendar. Toth won an extra 5 days. On
those 5 days Nut gave birth to Oris, Horus the elder, Set, Isis, and
Nephthys. Oris became the symbol of good while Set became the symbol
2. "The Legend of Isis"
"Nut labored in her fullness of pregnancy for eons as the babies grew
to maturity in her womb. Never allowing to birth was a great agony for
the mother and children. Later the Goddess had another lover who was
Thoth, the magician. He played draughts (a gambling game) with the
Moon and won the seventy-second part of Her light. He made five days
out of this light (for that is a seventy-second part of the 29 days of
illumination of each of the twelve lunar months), and put them
together outside of all Her months. He added these five days to the
Egyptian year of three hundred and sixty days. This is the mythical
origin of the five supplementary days which the Egyptians annually
inserted at the end of each year to establish harmony between lunar
and solar time. On these five days regarded as outside the year of
twelve months, the curse of the sun God did not rest, and accordingly
Nut was able to bear Her children in these five days out of time."
3. "The Lostware Project"
"At first there was only Nun, the primal ocean of chaos that contained
the beginnings of everything to come. From these waters came Ra who,
by himself, gave birth to Shu and Tefnut. Shu, the god of air, and
Tefnut, the goddess of moisture gave birth to Geb and Nut, the earth
god and the sky goddess. And so the physical universe was created. Men
were created from Ra's tears. They proved to be ungrateful so Ra, and
a council of gods, decided they should be destroyed. Hathor was
dispatched to do the job. She was very efficient and slaughtered all
but a remnant, when Ra relented and called her off. Thus was the
present world created. Against Ra's orders, Geb and Nut married. Ra
was incensed and ordered Shu to separate them, which he did. But Nut
was already pregnant, although unable to give birth as Ra had decreed
she could not give birth in any month of any year. Thoth, the god of
learning, decided to help her and gambling with the moon for extra
light, was able to add five extra days to the 360-day calendar. On
those five days Nut gave birth to Osiris, Horus the Elder, Set, Isis,
and Nephthys successively. Osiris became the symbol of good, while Set
became the symbol of evil. And thus the two poles of morality were
fixed once and for all."
"Thanks to the separation the heavenly bodies could be born and take
their place at the celestial sky. In an alternative version Ra wanted
to accomplish that in no month of the year children could be born. The
god Toth however, won a small piece of the light of the moon and gave
5 days at the end of the year which do not belong to any month. In
Egypt these days were on August 24-28 and celebrations were for Noet.
In these days Osiris (the green or green valley), Horus (the eldest),
Set (the dry dessert), Isis and Nephtys were born. The sun and moon
are sometimes called her children, sometimes even her eyes."
5. "Gods and Myths"
"Choleric Ra because Nut was loved by Geb, and this was corresponded,
it decreed that the goddess would not have children in any month
neither in any year. The curse of Ra could not be ignored to be the
supreme god. Nut goes to Thoth that also loved her, and this goes to
the god of the Moon that competes with the Sun in brightness. It
challenges to a table game with a strong bet; the god of the Moon
loses the game and the bet that it consisted on the seventeenth part
of its brightness (for this reason the Moon disappears every 28 days).
With this light, Thoth adds 5 days a year (before the year he/she had
360 days) in such a way that you/they don't belong to the previous
year neither the following one, neither to any month; they are the 5
days epagómenos that allow to leave aside the curse of Ra. In these
days, Nut has its children Osiris, Horus (the old one), Seth, Isis and
Google: +Toth +Nut +gamble OR +gambling
I hope you have enough information. If you need any more, please ask
for a clarification.