Sankhya Kārika
Karika 22
प्रकृतेर्महांस्ततोऽहङ्कारस्तस्माद्गणश्च षोडशकः। तस्मादपि षोडशकात्पञ्चभ्यः पञ्च भूतानि ॥२२॥
From the manifested material universe (prakr̥ti) comes the great (mahan); from the great comes the ego (ahaṅkāraḥ); then from ego the set of sixteen. From that sixteen, specifically from the five, comes five elements.
Four stage evolution of 24 principles is described:
  1. Step 01: manifested material universe (prakr̥ti) to the great (mahan)
  2. Step 02: the great (mahan) to ego (ahaṅkāraḥ)
  3. Step 03: ego (ahaṅkāraḥ) to set of 16 (11 indriyas + 5 sensations)
  4. Step 04: 5 sensations to 5 elements