The ancient logic on how different musical notes are created in a Saptak is very insightful and relevant.
The fundamental notes in music are S and P and the Tanpura is tuned to these notes for the same reason.
Other than P, the next important note is M because, the upper S' becomes the P of it.
The natural ratio of the frequencies of S:P is 100:150, and of S:M is 100:133.33333. These are obtainable after an analysis of an extremely well-tuned Tanpura. In other words, from any musical note (taken as 100), the note at 133.33333 % is it's Madhyam, and the note at 150 % is it's Pancham.
Therefore, beginning from any Shadja, if we continue the S:P cycle ahead by adding 50 % to the frequency of the earlier note, we shall complete the cycle, coming back to S' and giving 12 positions or places.
Similarly, if we continue the S:M cycle ahead by adding 33.33333 % to the earlier note, we shall complete the cycle, coming back to S' giving 12 additional positions or places.
In total, 24 places or 24 musical notes are obtained. (Refer to following figure)
Thus, we get 24 places or musical notes or shrutis at the natural ratios of S:P and S:M.
Out of these, S and P have been considered 'Achala' or immovable or fixed by our ancestors. Subtracting these 2 from 24, we get 22 Shrutis.
The exact frequencies of these 24 positions were however obscure for all these years because of the unresolved mathematical difficulties explained in Topic 13.