Надеюсь не офф...
Пришлось не так давно открыть книгу П.Рибенбойма, с чьей легкой руки видимо пошло утверждение о способе счета солдат в Древнем Китае. В принципе, он серьезный математик и в "травле анекдотов" особенно не замечен.
В качестве иллюстрации его дотошности хочу привести еще одну длинную цитату из той же книги (Paulo Ribenboim "The Book of Prime Number Records", New York: Springer-Verlag, 1988, со стр. 103, начало главы 8).
Сначала предпошлю небольшой комментарий, т.к. возможно найдется пара человек, слегка подзабывших теорию чисел и основы криптографии
Тех, кто помнит, прошу меня сильно не пинать за некоторый примитивизм.
Речь в цитате пойдет об утверждении, которое является обратным к т.н. "малой теореме Ферма". Не пустать с "великой" (или "последней") теоремой Ферма. Это разные теоремы, хотя Ферма один и тот же Пьер.
Задачу, с которой связана малая теорема Ферма, можно сформулировать упрощенно, в стиле "солдат на плацу": Пусть 2
N солдат встали в колонну по N. Сколько солдат в последнем ряду?
Попробуем несколько первых N (кто не знает, что такое "(mod N)", воспринимайте как указание на последний неполный ряд):
N=
2; 2
2 = 4 = 2 + (
2*1) =
2 (mod 2)
N=
3; 2
3 = 8 = 2 + (
3*2) =
2 (mod 3)
N=
4; 2
4 = 16 = 4 + (
4*3) =
4 (mod 4)
N=
5; 2
5 = 32 = 2 + (
5*6) =
2 (mod 5)
N=
6; 2
6 = 64 = 4 + (
6*10) =
4 (mod 6)
N=
7; 2
7 = 128 = 2 + (
7*18) =
2 (mod 7)
N=
8; 2
8 = 256 = 8 + (
8*31) =
8 (mod 8)
N=
9; 2
9 = 512 = 8 + (
9*56) =
8 (mod 9)
N=
10; 2
10 = 1024 = 4 + (
10*102) =
4 (mod 10)
N=
11; 2
11 = 2048 = 2 + (
11*186) =
2 (mod 11)
N=
12; 2
12 = 4096 = 4 + (
12*341) =
4 (mod 12)
N=
13; 2
13 = 8192 = 2 + (
13*630) =
2 (mod 13)
...
Как видим, "красные" N всегда дают двойку в последнем ряду, а у "зеленых" N разнобой. Кто еще помнит школьную математику, сразу должен увидеть, что все красные N - т.н "простые числа" ("prime numbers"), а зеленые N - "составные" ("composite numbers"). Напомню, что простые делятся только на себя и единицу, а составные еще и на другие числа. Например, 7 - простое, т.к. делится только на 1 и 7, а 6 - составное, т.к., кроме 1 и 6, еще делится на 2 и 3. В частности, простые числа - важнейший элемент современной криптографии, с чего началась эта ветка.
То, что для простого числа это утверждение верно, обосновал (не строго) Пьер Ферма, строгое доказательство дал Леонард Эйлер. Долгое время считалось, что обратная теорема тоже верна, хотя доказать не смогли. С формулировки обратного утверждения: "Если при делении числа 2
N на N получаем два в остатке, то N простое" как раз начинается приводимая далее цитата.
В 1819 нашли первый контрпример составного N=341=11*31:
N=
341: 2
341 = 2 +
341*
13136332798696798888899954724741608669335164206654835981818117894215788100763407304286671514789484550
=
2 (mod 341)
(Реально остатки считаются проще, не хочу сейчас в это лезть).
Такие составные N называют псевдопростыми (pseudoprime). Их бесконечно много, хоть и встечаются редко, вот несколько первых: N=341, 561, 645, 1105, 1387, ..., проверяйте
Часть текста от "Li Shan-Lan (1811-1882), a well-known mathematician of the Qing period" как раз про это.
Остальной текст должен быть понятен без комментариев. Кажется, что отсылки "Old Chinese Theorem" к конфуцианскому Китаю разоблачены. Тем не менее в отношениии применения китайской теоремы об остатках к подсчету китайской армии Рибенбойм пишет уверенно (цитата есть пару постов выше), хоть и без источников. В общем, лишний косвенный аргумент в поддержку реального существования такого метода подсчета в китайской армии.
Сказал все, что мог. Дальше идет обещанная цитата, цитату письма Man-Keung Siu покрасил синим, чтоб выделялась.
VIII. Pseudoprimes
A problem, commonly attributed to the ancient Chinese, was to ascertain whether a natural number n must be a prime if it satisfies the congruence
2n = 2 (mod n).
In Dickson's History of Theory of Numbers, Vol.I, p.91, it is quoted that Leibniz believed to have proved that the so-called Chinese congruence indicated above implies that n is a prime.
The story is also repeated, for example, in Honsberger's very nicely written chapter "An Old Chinese Theorem and Pierre de Fermat" in his book Mathematical Gems, Vol.I, 1973.
On this subject, there are legends and speculations. One should be prudent before making preemptory statements. In view of that one believes to be the knowledge about numbers in ancient China, it seems difficult to conceive that such a question could even be formulated.
Thanks to Erdos, I got into direct contact with Man-Keung Siu, from Hong Kong, self-confessed "mathematics, who is deeply interested in the history of mathematics and believes in its value". In a letter to me, Siu wrote that this myth originated in a paper by J.H.Jeans, in the Messenger of Mathematics, 27, 1897/8, who wrote that "a paper found among those of the late Sir Thomas Wade and dating from the time of Confucius" contained the theorem that 2n=2 (mod n) holds if and if n is a prime number. However, in a footnote to his monumental work Science and Civilisation in China, Vol.3, Chap.19 (Mathematics), J.Needham dispels Jeans's assertion, which is due to an erroneous translation of a passage of the famous book The Nine Chapters of Mathematical Art.. This mistake has been perpetuated by several Western scholars.
There is now a better founded version of the events. In a resent letter (February 1992), Siu wrote:
I have just seen the doctoral thesis, written in Chinese, of Han Qi, on the mathematics in the Qing period, entitled Transmission of Western Mathematics during the Kangxi Kingdom and its Influence Over Chinese Mathematics, Beijing, 1991. The author points out new evidence concerning "the old Chinese Theorem". According to Han, this "theorem" is due to Li Shan-Lan (1811-1882), a well-known mathematician of the Qing period (thus the statement is not so old). Li mentioned his criterion to Alexander Wade, who was his collaorator in the translation of Western texts. Wylie, who probaply did not understand mathematics, presented Li's criterion in a note "A Chinese theorem" to the journal Notes and Queries on China, Hong Kong, 1869 (1873). In the succeeding months, at least four readers have written comments on the work of Li; one of the readers pointed out that Li's statement was wrong. Among the readers there was a certain J. von Gumpach, a German who later became a colleague of Li in Beijing. Apparently, Gumpach told Li of his mistake. As a result, in a later publication on number theory (1872), Li Shan-Lan deleted any reference to his criterion.... However, in 1882, Hua Heng-Fang published a treatise on numbers in which he includes Li's criterion as if it were correct. This might help to explain why the Western historians of Chinese mathematics were led to think that the criterion might be an old Chinese theorem. Han Qi has announced that he will publish an article on this question, with more details.
Concerning the works of Li Shan-Lan you may wish to consult the book of Li Yan and Du Shiran, in an English translation of 1987.