https://en.wikipedia.org/wiki/Ashtavakra
Puranas[edit]Aṣṭāvakra and Śvetaketu made his way to Janaka's palace. Aṣṭāvakra first faced the gatekeeper who tried to keep the young boy out. On convincing the gatekeeper that he was well versed in the scriptures and hence old, he was let in. Then Janaka tested Aṣṭāvakra with cryptic questions which Aṣṭāvakra answered with ease. Janaka decided to let Aṣṭāvakra face Vandin. Vandin and Aṣṭāvakra began the debate, with Vandin starting. They alternately composed six extempore verses on the numbers one to twelve. Then Vandin could only compose the first half of a verse on the number thirteen. Aṣṭāvakra completed the verse by composing the second half and thus won the argument against Vandin. This unique debate is full of enigmas and latent meanings which lie under the simple counts of the numbers one to thirteen.[14]Ramayana[
Aṣṭāvakra is referenced in verse 6.119.17 of Yuddha Kāṇḍa in Vālmikī's Rāmāyaṇa. When Daśaratha comes to see Rāma from heaven after the war of the Rāmāyaṇa, he tells Rāma –[10]
O son! I have been conveyed across (redeemed) by you, who are a deserving son and a great being; like the virtuous Brahmin Kahoḍa [was redeemed] by [his son] Aṣṭāvakra. ॥ 6.119.17 ॥
In the Aranya Kanda of Adhyatma Ramayana, the demon Kabandha narrates his story to Rama and Lakshmana, in which he says that he was a Gandharva earlier who was cursed by Ashtavakra to become a demon when he laughed on seeing him (Ashtavakra).[11] When the Gandharva then bowed down to Ashtavakra, Ashtavakra said that he would be released from the curse by Rama in Treta Yuga.[11]
debating with Ashtavakra. Art from the epic
In the Vana Parva of the Mahābhārata, the legend of Aṣṭāvakra is described in greater detail. On losing the game of dice with the Kauravas, the five Pāṇḍava princes and Draupadi are exiled for twelve years. On their pilgrimage, they meet the sage Lomaśa, and he narrates to the Pāṇḍava princes the legend of Aṣṭāvakra, over three chapters of Vana Parva of the Mahābhārata.[12][13] Aṣṭāvakra's wisdom on various aspects of human existence is recited in the Mahābhārata. For example:
A grey head does not make an elder,
Not by years, not by grey hairs, not by riches nor by relations did the seers make the Law,
He who is great to us, is one who has learning.