In Hinduism, Shesha (Sanskrit: Śeṣa), also known as Sheshanaga (Śeṣanāga) or Adishesha(Ādi Śeṣa) is the nagaraja or king of all nāgas and one of the primal beings of creation. In the Puranas, Shesha is said to hold all the planets of the universe on his hoods and to constantly sing the glories of the god Vishnu from all his mouths. He is sometimes referred to as Ananta Shesha, which translates as endless-Shesha or Adishesha "first Shesha". It is said that when Adishesa uncoils, time moves forward and creation takes place and when he coils back, the universe ceases to exist.
Vishnu is often depicted as resting on Shesha. Shesha is also considered a servant as well as a manifestation of Vishnu. He is said to have descended to Earth in four human forms or avatars: Lakshmana, brother of Rama; Balarama, brother of Krishna, Ramanuja and Manavala Mamunigal. Patanjali the major compiler of yogic traditions is also considered to be an incarnation of Shesha.
"Shesha" in Sanskrit texts, especially those relating to mathematical calculation, also implies the "remainder" – that which remains when all else ceases to exist.
Example via www.ramdass.org: Patanjali’s Yoga Sutras