Automorphic Number Calculator

Number

Automorphic verdictYes
n squared625
Last digits of n squared25
Trailing digits matching n2 of 2
How this was calculated
  1. An automorphic number is one whose square ends with the number itself - its digits are 'preserved' by squaring.
  2. Squaring 25 gives 625.
  3. The square ends in 25, while n is 25 - 2 of the 2 trailing digits match.
  4. So 25 is an automorphic number.

An automorphic number is a number whose square ends with the number itself. This automorphic number calculator checks any number you enter and tells you whether it is automorphic, showing you exactly which trailing digits of the square match. For example, 25 is automorphic because 25 squared is 625, which ends in 25, and 76 is automorphic because 76 squared is 5,776, which ends in 76. By contrast, 28 is not automorphic: 28 squared is 784, which ends in 84, so 0 of its 2 trailing digits match. The automorphic numbers begin 1, 5, 6, 25, 76, and beyond the small cases there is one automorphic ending for each number of digits in base 10.

The calculator relies on the standard definition of an automorphic number — comparing the trailing digits of the square with the original number — which is the accepted basis for this kind of calculation. That direct digit comparison is what makes the result reliable and easy to verify by hand. Alongside the answer, this page shows the formula used, step-by-step workings, worked examples and sources, so you can follow the method yourself and confirm each result rather than simply trusting the output.

Worked examples

25, whose square 625 ends in 25

(25)

Automorphic verdictYes
n squared625
Last digits of n squared25
Trailing digits matching n2 of 2

76, whose square 5,776 ends in 76

(76)

Automorphic verdictYes
n squared5,776
Last digits of n squared76
Trailing digits matching n2 of 2

28, whose square 784 ends in 84

(28)

Automorphic verdictNo
n squared784
Last digits of n squared84
Trailing digits matching n0 of 2

What is an automorphic number?

An automorphic number is one whose square ends with the number itself. That single sentence is the whole test: take a number, multiply it by itself, and look at the final digits of the result. If those trailing digits spell out the original number, in the same order, the number is automorphic. If even one of them is off, it is not. An automorphic number calculator simply runs this digit-preservation check for you, so you can test any number without squaring it by hand and counting digits from the right.

The test is easiest to see with a two-digit example. Twenty-five is automorphic: 25 squared is 625, which ends in 25. The square is longer than the original, but that does not matter — only the trailing digits are compared. Seventy-six works the same way: 76 squared is 5,776, which ends in 76. Now compare a number that fails. Twenty-eight is not automorphic: 28 squared is 784, which ends in 84 — 0 of its 2 trailing digits match. The square is perfectly correct arithmetic; it just does not preserve the original digits, so 28 is excluded.

The automorphic numbers begin 1, 5, 6, 25, 76. Notice how sparse that starting list is: single digits give you only 1, 5 and 6, and the next two entries are the two-digit cases shown above. The pattern continues in an unusual way. Beyond the small cases there is one automorphic ending for each number of digits in base 10. In other words, for every digit length past the small cases, exactly one ending of that length preserves itself when squared. That makes automorphic numbers rare and makes the trailing-digit check the practical way to find them — you are looking for a very specific ending rather than a broad family of numbers.

A quick way to read any result: count the digits in the original number, then look only at that many digits at the end of its square. If they match exactly, the number passes; if they differ in any position, it fails. The 28 example shows why the count matters — 784 ends in 84, and comparing the two trailing digits against 28 gives zero matches. The 25 and 76 examples show the pass case, where every trailing digit lines up. This is the same rule the calculator applies, and it works the same way whether the number has one digit or many.

Keep the definition separate from related ideas. An automorphic number is not defined by how its square looks overall, how many digits the square has, or whether the square contains the original digits somewhere in the middle. The only question is whether the square ends with the number itself. That narrow, precise rule is what puts 1, 5, 6, 25 and 76 on the list and keeps 28 off it.

  • 1 squared is 1, which ends in 1 — automorphic.
  • 5 squared is 25, which ends in 5 — automorphic.
  • 6 squared is 36, which ends in 6 — automorphic.
  • 25 squared is 625, which ends in 25 — automorphic.
  • 76 squared is 5,776, which ends in 76 — automorphic.
  • 28 squared is 784, which ends in 84 — not automorphic (0 of 2 trailing digits match).
The test in one line: square the number, then check whether the last digits of the square are the original number. 25 passes (625 ends in 25); 28 fails (784 ends in 84).

Worked examples

The clearest way to see what an automorphic number calculator is checking is to square a few numbers by hand and line up the trailing digits. The rule is simple: an automorphic number is one whose square ends with the number itself. So the question is always whether the last digits of the square match the digits of the original number, in the same order.

Start with 25. Squaring it gives 625. Now compare the trailing digits one by one, from the right. The final digit of 625 is 5, and the final digit of 25 is 5, so the first comparison matches. Move one place left: the next digit of 625 is 2, and the next digit of 25 is 2, so the second comparison matches too. Both trailing digits of the square line up with 25, which means 25 is automorphic: 25 squared is 625, which ends in 25.

Next take 76. Squaring it gives 5,776. Compare from the right again. The last digit of 5,776 is 6, matching the 6 in 76. The digit to its left is 7, matching the 7 in 76. Both digits line up, so 76 is automorphic: 76 squared is 5,776, which ends in 76. Notice that the match is on the last two digits only; the leading 5 in 5,776 plays no part in the check, because the rule looks at trailing digits, not the whole square.

Now try 28, which fails. Squaring 28 gives 784. Compare from the right: the last digit of 784 is 4, but the last digit of 28 is 8, so that comparison does not match. Move one place left: the next digit of 784 is 8, while the next digit of 28 is 2, so that comparison fails as well. 28 is not automorphic: 28 squared is 784, which ends in 84 - 0 of its 2 trailing digits match. This example is useful because the square does share some digits with the original number, yet the trailing-digit test still comes out at zero matches.

These three cases show the pattern the tool applies every time: square the number, then compare trailing digits one by one from the right. The automorphic numbers begin 1, 5, 6, 25, 76 - beyond the small cases there is one automorphic ending for each number of digits in base 10.

NumberSquareTrailing digits of squareDigits matchedAutomorphic?
25625252 of 2Yes
765,776762 of 2Yes
28784840 of 2No
The check only ever looks at trailing digits: 784 contains an 8, but 28 squared still ends in 84, not 28.

Why automorphic numbers come in pairs

If you test a range of numbers with an automorphic number calculator, a pattern shows up quickly: the results tend to arrive in pairs. The automorphic numbers begin 1, 5, 6, 25, 76, and beyond the small cases there is one automorphic ending for each number of digits in base 10. That means for a given length of digits, you generally find two endings rather than one — and they are partners in a very specific way.

Look at the two-digit case. 25 is automorphic: 25 squared is 625, which ends in 25. 76 is automorphic: 76 squared is 5,776, which ends in 76. One ending finishes in 5, the other in 6, and together they cover the full two-digit range: 25 + 76 = 101. That is not a coincidence of this example. The two d-digit automorphic endings always sum to 10^d + 1. For d = 2, 10^2 + 1 = 101, and 25 + 76 = 101 exactly.

The reason the pairing holds is that an automorphic ending is a solution to a squaring condition, and those solutions come in complementary pairs. One member of each pair ends in 5, the other ends in 6. The 5-ending family and the 6-ending family each contribute exactly one ending of every digit length once you are past the small cases, and the two endings of any given length are the ones that add up to 10^d + 1. This is why the list reads as pairs: 5 with 6, 25 with 76, and so on as the digit count grows.

The pairing is also a useful check. If you find one d-digit automorphic ending, you can predict its partner by subtracting it from 10^d + 1 — no squaring required. And it helps you avoid false positives. 28 is not automorphic: 28 squared is 784, which ends in 84 — 0 of its 2 trailing digits match. It sits nowhere near the 25/76 pair, and it does not satisfy the squaring test that both members of a true pair must pass.

Keep in mind that the pairing describes the endings, not every number that contains them. The rule is about the trailing digits of a d-digit automorphic number, so the partner relationship tells you which endings belong together at each length. Use it as a shortcut and a sanity check, then confirm any candidate by squaring it and comparing the trailing digits.

For any digit length d, the two automorphic endings add up to 10^d + 1. Two digits: 25 + 76 = 101. Find one ending and you can get its partner by subtraction.

Automorphic numbers in other bases

An automorphic number is one whose square ends with the number itself. That definition sounds absolute, but it is not: the trailing digits of a square depend entirely on the base you write the number in. Change the base and you change which numbers qualify. A number that looks automorphic in base 10 may fail in base 2 or base 16, and a number that fails in base 10 may pass elsewhere. The property is a statement about digits, and digits only exist relative to a base.

In base 10 the familiar examples are easy to check. 25 is automorphic: 25 squared is 625, which ends in 25. 76 is automorphic: 76 squared is 5,776, which ends in 76. And 28 is not automorphic: 28 squared is 784, which ends in 84, so 0 of its 2 trailing digits match. The automorphic numbers begin 1, 5, 6, 25, 76, and beyond the small cases there is one automorphic ending for each number of digits in base 10. That tidy one-per-length pattern is a base-10 fact, not a universal law, and an automorphic number calculator should make clear which base it is working in.

There is a deeper way to see why the base matters, and it explains the base-10 pattern at the same time. Automorphic endings in base 10 are the idempotents of the 10-adic numbers, meaning solutions of x squared equals x in that system. Because 10 factors as 2 times 5, the 10-adic solutions split into two families, one tied to the factor 2 and one tied to the factor 5. The two families are what generate the two automorphic endings at each length, such as 25 and 76, or 625 and 376, and they are why exactly one ending appears for each number of digits. This 2-adic view, and its 5-adic counterpart, shows that the count and shape of automorphic endings are governed by the prime factors of the base rather than by the decimal system alone.

That is the practical takeaway for anyone using an automorphic number calculator: always state the base. A result computed in base 10 does not carry over to another base, and the one-ending-per-digit-length rule should not be assumed outside base 10. The underlying idea stays the same everywhere, since an automorphic number is still one whose square ends with the number itself, but which digits count as an ending, and how many such endings exist at a given length, is decided by the base you choose.

Automorphic endings are base-dependent: in base 10 they are exactly the idempotents of the 10-adic numbers, split into a 2-family and a 5-family by the factors of 10.

FAQs

What is an automorphic number?

An automorphic number is a number whose square ends with the number itself. For example, 76 is automorphic because 76 squared is 5,776, and that result ends in 76. The ending digits of the square match the original number exactly, which is the defining test for any candidate you check.

Is 25 an automorphic number?

Yes. 25 is an automorphic number. When you square 25, the result is 625. The last two digits of 625 are 25, which matches the original number. Because the square ends with the number itself, 25 passes the automorphic test and counts among the early automorphic numbers.

Is 76 an automorphic number?

Yes. 76 is an automorphic number. Squaring 76 gives 5,776. The final two digits of 5,776 are 76, exactly matching the original number. Since the square ends with 76, the number satisfies the definition, making 76 one of the well-known automorphic examples.

Is 28 an automorphic number?

No. 28 is not an automorphic number. Squaring 28 gives 784. That square ends in 84, not 28, so it fails the test. For a number to be automorphic, the square must end with the original number itself, and 784 does not end with 28.

What are the first automorphic numbers?

The first five automorphic numbers are 1, 5, 6, 25 and 76. Each one, when squared, produces a result whose ending digits match the number itself. These five are the smallest examples, and the list continues with larger numbers that follow the same ending-digit rule.

Can a number ending in 2 be automorphic?

No. A number ending in 2 cannot be automorphic, because its square would end in 4. Since the square must end with the original number, an ending of 4 does not match an ending of 2. Automorphic numbers above 1 end only in 5 or 6.

Sources

Related calculators

Happy Number Calculator
Test whether a number is happy: repeatedly replace it by the sum of the squares of its digits and see whether the chain reaches 1 or falls into a loop.
Harshad Number Checker
Tests whether a number is a Harshad (Niven) number - divisible by the sum of its digits - with the digit sum, the division and the next Harshad number.
Smith Number Calculator
Test whether a number is a Smith number: compare the sum of its digits with the sum of the digits of its prime factors counted with multiplicity, with the full prime factorization shown - 666 and 22 qualify, most numbers do not.