It is observed that there were two periods of rapid progress and innovation in Chinese mathematics: the Six Dynasties (third-sixth century) and the transition from Southern Song to Jin and Yuan dynasties (thirteenth century), both being times of imperial decline. On the other hand, during periods of imperial upswing, namely Qin-Han, Sui-Tang, and Ming, we find that, apart from a few exceptions, Chinese mathematics was in stagnation. This remarkable coincidence leads to the conjecture that there might be a subtle correlation between mathematical progress and imperial decline, which can perhaps be explained by the negative impact of Confucian ideology and prospects of obtaining government office on the exercise of creativity in purely scholarly pursuits, and the absence of such unfavourable influence at times of imperial decline. The life and career of a number of leading mathematicians are discussed to illustrate the point. It is then proposed that mathematical development in ancient China follows a pattern of occasional breakthroughs superimposed on very slow progress. The second part of the paper addresses the question of foreign influence. While a considerable amount of Indian, Islamic and Western mathematics was known to have been introduced into China ever since mid-sixth century, surprisingly it did not seem to have produced any significant influence. However, it is pointed out that there is some internal evidence showing that the possibility of the remarkable work of Liu Hui, Zu Chongzhi and Zu Hengzhi having been inspired by Archimedes cannot be easily discounted. The autochthonous character of Chinese mathematics is then discussed.