Ra, the Father of Kings
This myth was used to serve a crucial political purpose which id the desire of the members of the 5th dynasty and the members of the family of Cheops in particular to give themselves the legitimacy of assuming the power of Egypt and ascending to the throne. According to the myth there was a magician called Dedi who said that he knows the secret numbers that opens the lock of the sanctuary of Thuth, the god of wisdom. When King Cheops, the builder of the pyramids, wanted to use these secrets in order to protect his building, he asked the magician to give him these numbers but he said that these numbers are hidden in a coffin in Heliopolis and the only one who knows them is the eldest son of the Red-Dedet.

