“There are things whose number we do not know. Counted by threes, two remain; by fives, three; by sevens, two. How many things?” That riddle is 1,600 years old, and its answer — that a number is pinned down by its remainders — runs modern cryptography. It runs in real I-13 on the merged %, and gives the ancient answer: 23.
To satisfy several remainder conditions with coprime moduli, walk in steps of one modulus until the next condition holds, then combine and repeat. The remainders uniquely determine the number modulo the product. Solve Sunzi’s riddle, or your own. live demo
Most “named-after-a-place” theorems are misattributions; this one earns its name — it is Chinese, and it predates Gauss by 1,500 years. cited
A riddle about not counting became the mathematics that counts your bank transactions. foundational
Search in steps of one modulus until the next remainder matches, then merge — pure % and recursion. It runs, and returns Sunzi’s 23: