About automorphic numbers
This family came up through recreational arithmetic rather than research. The one-digit cases 0, 1, 5 and 6 were called circular numbers for a long time before anyone extended the idea, and the older literature sometimes used circular and spherical for the related property of a number whose every power ends in the same digit. Wikipedia still records "circular number" as an alternative name. The term automorphic — formed on itself — came into general mathematical use around the early 1940s, and is usually traced to Maurice Kraitchik's Mathematical Recreations of 1942, which did a great deal to popularise it. The provenance before that point is thin, and claims that particular ancient civilisations knew the pattern should be treated with caution.
What rescues the topic from triviality is the algebra underneath. Asking for a k-digit number whose square ends in itself is asking for a solution of x² ≡ x modulo 10^k — an idempotent in the ring of integers modulo 10^k. Since 10 factors as 2 · 5, the Chinese remainder theorem splits that ring in two, and the number of idempotents is exactly 2 raised to the number of distinct prime factors of the base: four in base 10, namely 0, 1, and a complementary pair.
Push k upwards and the digits of each pair member stop changing: 6, 76, 376, 9376, 109376, 7109376 are successive truncations of a single infinite object. That object is an idempotent of the ring of 10-adic integers, the number system Kurt Hensel (1861–1941) arrived at in 1897 while adapting Weierstrass's power-series methods to algebraic functions and developed systematically in his Theorie der algebraischen Zahlen of 1908. The schoolroom curiosity and Hensel's lemma turn out to be the same statement seen from two ends.
Key properties
- A number n is automorphic exactly when n² ≡ n modulo 10^k, where k is the digit count of n.
- In base 10 there are precisely four solutions of x² ≡ x (mod 10^k) for every k ≥ 1 — in general 2^ω(b) solutions in base b, where ω counts the distinct prime factors of b.
- The two non-trivial solutions modulo 10^k always sum to 10^k + 1: 376 + 625 = 1001, and 9376 + 625 = 10001.
- Every automorphic number other than 0 and 1 ends in 5 or in 6, and the two families are exactly those two complementary solutions.
- Some lengths have only one automorphic number, because the other solution carries a leading zero: the length-4 pair is 9376 and 0625, so only 9376 counts.
- The sequence begins 0, 1, 5, 6, 25, 76, 376, 625, 9376, 90625, 109376, 890625, 2890625, 7109376 and continues indefinitely, gaining about one digit per term.
- Each term agrees with the next in all its digits, so the two families converge digit-by-digit on the two non-trivial idempotents of the 10-adic integers.
Where they turn up
- The idempotents of Z/nZ that these numbers represent are a standard first example in ring theory courses, and the digit-by-digit extension is a standard first example of Hensel lifting.
- Writing a program to find automorphic numbers is a common exercise in introductory programming courses, usually as a lesson in string comparison versus modular arithmetic.
- The same construction gives the two non-trivial idempotents of the 10-adic integers, which is why the decimal expansions …8212890625 and …1787109376 recur throughout introductory p-adic material.
- Trimorphic numbers — those where n³ ends in n — are the natural generalisation, and every automorphic number is one: if n² ≡ n then n³ ≡ n·n² ≡ n² ≡ n to the same number of digits. The containment is strict, since 4³ = 64 ends in 4 while 4² = 16 does not.
- Because every automorphic number past the trivial two ends in 5 or 6, they turn up in puzzle columns as a guessing game about last digits.
How to use this generator
The generated values appear at the top, with a copy button beside them. To turn them into an image, pick a look from the style presets under Make an image, choose an export size, and download as PNG, JPEG or WebP. Everything is rendered in your browser, so nothing you generate is sent to a server.
The address bar updates as you work, so the link always reproduces exactly what you see — handy for sharing a specific sequence or saving a configuration for later. Use Copy to take the values as plain text, or Export data for CSV, JSON, NDJSON, SQL or XML.
Sources
- Automorphic number — Wikipedia — CC BY-SA 4.0
- OEIS A003226 — Automorphic numbers — CC BY-SA 4.0
- MacTutor History of Mathematics — Kurt Hensel — CC BY-SA 4.0
- Hensel's lemma — Wikipedia — CC BY-SA 4.0
- p-adic number — Wikipedia — CC BY-SA 4.0
Historical summaries on this page draw on the openly licensed references listed above. Spotted an error? Tell us and we will fix it.