कटपयादि Number System (Coalescence of Literature and Science in Ancient India)
It is a numerical technique accredited in ancient India to depict letters to numerals for easy remembrance of numbers as words or verses.
Mechanism of this system-
- All stand-alone vowels (like अ, आ, इ etc.) represent zero.
- The consonant group have numerals assigned as per the following table.-

- In a conjunct consonant, the last of the consonants alone will count
(Like in क्या, it is formed by क्+य+अ. The only consonant standing with a vowel is य. So the corresponding numeral for क्या will be 1).
- A consonant without a vowel is to be ignored (Like द् is associated with 0).
Now the time appears to see the mathematical wisdom of ancient Indians in the twist of extraordinary poetry.
a) Sankara Varman once wrote a verse in the 4th chapter of his book Sadratnamala-
भद्राम्बुधिसिद्धजन्मगणितश्रद्धा स्म यद् भूपगी:
Splitting the consonants in the relevant phrase gives,

Reversing the digits to modern-day usage of descending order of decimal places, we get 314159265358979324 which is the value of π to 17 decimal places, except the last digit, which might be rounded off to 4.
b) Jagadguru Shankaracharya Swami Bharati Krishna Tirtha wrote a sloka, which is literally in seance the praise for Lord Krishna-
गोपीभाग्य मधुव्रात:
शृङ्गिशोदधि सन्धिग।
खलजीवितखाताव
गलहाला रसंधर॥
("O Lord anointed with the yoghurts of the milkmaids' worship, O savior of the fallen, O master of Shiva, please protect me")
If you want to decode this verse in terms of the Katapayadi system, you can get, 31415926535897932384626433832792. It means this verse encrypts the exact value of π up to 31 decimal places.
c) Let us now talk about कटपयादि संख्या method how ancient Indians encoded the value of one more famous irrational number 'e' (2.7182818....) into the following verse-
रथ यह राजा का है।
After deciphering this verse into number we get 27182818, which is the exact value of e upto 7 decimal points.
In this note, take a deep breath and think about this once more. In ancient times Indians were able to determine the exact value of irrational number π up to 31 decimal places and encrypted them into such a great sloka. Just try to imagine their mathematical wisdom and literary efficiency.
--
(Source- https://www.youtube.com/watch?v=volJL-pvHc4)