Taiwanese Journal of Mathematics


Qi Han and Man-Keung Siu

Full-text: Open access


In the western world there is this myth that the ancient Chinese knew a special case of Fermat's Little Theorem and erroneously took it as a criterion for primality, namely, that $n$ is a prime if and only if $2^{n-]} -1$ is divisible by $n$. This article discusses how this myth might have come about, in particular tells the story of an investigation on number theory by Li Shanlan in the mid $19^{\rm th}$ century. The discussion touches upon the social history of the incident in connection with the polarized attitude different foreigners took towards Chinese mathematics at the time.

Article information

Taiwanese J. Math., Volume 12, Number 4 (2008), 941-949.

First available in Project Euclid: 18 July 2017

Permanent link to this document

Digital Object Identifier

Mathematical Reviews number (MathSciNet)

Zentralblatt MATH identifier

Primary: 01A25: China 01A55: 19th century 11A07: Congruences; primitive roots; residue systems 11A51: Factorization; primality

Carmichael number Fermat's Little Theorem Li Shanlan


Han, Qi; Siu, Man-Keung. ON THE MYTH OF AN ANCIENT CHINESE THEOREM ABOUT PRIMALITY. Taiwanese J. Math. 12 (2008), no. 4, 941--949. doi:10.11650/twjm/1500404988. https://projecteuclid.org/euclid.twjm/1500404988

Export citation


  • [1.] W. R. Alford, A. Granville and C. Pomerance, There are infinitely many Carmichael numbers, Annals Math., 139 (1994), 703-722.
  • [2.] W. W. Rouse Ball (and H. S. M. Coxeter), Mathematical Recreations and Essays, 13th edition, Dover, New York 1987; first edition published in 1892.
  • [3.] R. D. Carmichael, Note on a new number theory function, Bull. Amer. Math. Soc., 16 (1910), 232-238.
  • [4.] R. D. Carmichael, On composite numbers $P$ which satisfy the Fermat congruence $a^{P-1} \equiv 1 \pmod P$, Amer. Math. Monthly, 19 (1912), 22-27.
  • [5.] T. H. Cormen, C. E. Leiserson and R. L. Rivest, Introduction to Algorithms, MIT Press, Cambridge, 1990.
  • [6.] L. E. Dickson, History of the Theory of Numbers, Vol. I: Divisibility and Primality, Carnegie Institute of Washington, 1919; reprinted by Chelsea Publ. Co. New York, 1971.
  • [7.] Q. Han, Li Shanlan “Zhongguo Dingli” zhi youlei ji qi fanxiang [Origins and repurcussions of Li Shanlan's “Chinese Theorem”], Ziran Kexueshi Yanjiu [Studies in the History of Natural Sciences], 18(1) (1999), 7-13.
  • [8.] W. S. Horng, Li Shanlan: The Impact of Western Mathematics in China During the Late 19th Century, PhD thesis, City University of New York, New York, 1991.
  • [9.] A. Korselt, Problème chinois, L'intermédiare des mathématiciens, 6 (1899), 142-143.
  • [10.] J. C. Martzloff, Li Shanlan (1811-1882) and Chinese traditional mathematics, Mathematical Intelligencer, 14(4) (1992), 32-37.
  • [11.] J. Needham (with the collaboration of L. Wang), Science and Civilization in China, Vol. 3: Mathematics and the Sciences of the Heavens and the Earth, Cambridge University Press, Cambridge, 1959.
  • [12.] C. Pomerance, Carmichael numbers, Nieuw Archief Voor Wiskunde, 11(1) (1993), 199-209.
  • [13.] P. Poulet, Table des nombres composés vérifiant le théorème de Fermat pour le module 2, jusqu'à 100.000.000, Sphinx, 8 (1938), 52; corrections in Math. Comp., 25 (1971), 944-945; 26 (1972), 814.
  • [14.] P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag, Heidelberg-New York, 1996.
  • [15.] P. Ribenboim, The Little Book of Bigger Primes, 2nd edition, Springer-Verlag, Heidelberg-New York, 2004.
  • [16.] A. Weil, Number Theory: An Approach Through History From Hammurapi To Legendre, Birkhäuser, Boston-Basel-Stuttgart, 1984.