The rise and development of the theory of series up to the early 1820s