The five royal sons were actually the sons of the sage DÄ«rghatamas.
It was in the city of Girivraja, the capital of Magadha Kingdom, that the illustrious sage Gautama (Dirghatamas is mentioned as Gautama here, since he belongs to the race of Gautama) begat on the Sudra woman Ausinari (the daughter of Usinara) Kakshivat and other celebrated sons.