ForHosting KIT · Math

Automorphic number checker

25 is automorphic because 25 squared is 625, which ends in 25. Enter any non-negative whole number to see its exact square, its digit count and whether the ending matches. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
N
25
You get
N squared
625
Digit count
2

An automorphic number—sometimes called a circular number—is a non-negative integer n such that n squared ends with exactly the same decimal digits as n itself. Classic one-digit cases include zero, one, five, and six: zero squared is zero, one squared is one, five squared is twenty-five, and six squared is thirty-six. Longer examples such as twenty-five (six hundred twenty-five), seventy-six (five thousand seven hundred seventy-six), three hundred seventy-six, and six hundred twenty-five appear in contest problems, recreational number theory, and classroom demos of modular arithmetic. Negative inputs are rejected with a clear validation error rather than a silent false result.

How the automorphic test and n squared are computed

Start with a non-negative integer n written in base ten. Compute the exact square s equals n times n using integer arithmetic so there is no floating-point rounding. Count the decimal digits d of n: zero has one digit, and for any positive n the digit count is the number of times you can divide by ten until nothing remains.

The automorphic property holds if and only if the last d decimal digits of s are exactly the digits of n. Algebraically that is the modular congruence s congruent to n modulo ten to the power d, written s mod 10^d equals n.

Where automorphic checks show up in real work

Classroom lessons on modular arithmetic and place value already use last-digit patterns for five and six; automorphic numbers extend that intuition to multi-digit endings and give students a named family to explore with twenty-five, seventy-six, and their longer relatives. Product and data teams sometimes need deterministic structural checks on numeric identifiers or generated codes when a full cryptographic checksum would be heavier than needed; an exact ends-with-square flag plus the square itself is a simple gate that can be audited offline.

If you later need range enumeration of all automorphic numbers, base-b automorphic forms, or uniqueness proofs for the two infinite sequences, treat those as separate search intents rather than overloading this landing.

Modular arithmetic teaching

Show students n, n squared, digit count, and the ends-with outcome so the automorphic definition is concrete, not abstract.

What is an automorphic number?

A non-negative integer n such that n squared ends with the same decimal digits as n. For example 25² = 625 ends with 25, so 25 is automorphic.

Why are negative values rejected?

This checker defines the property for n greater than or equal to zero only.

What does it cost?

The browser tool is free and runs locally.

Why is 10 not automorphic?

Because 10 squared is 100, and the last two digits of 100 are two zeros, not 10. The ending of the square has to repeat every digit of the number.

Which numbers are automorphic?

Small examples are 0, 1, 5, 6 and 25, and longer ones such as 625 also qualify. In each case the square ends with exactly the digits of the original number.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/numth/automorphic-number

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/numth/automorphic-number \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":25}'
{
  "n": 25
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.automorphic_number",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

min_n0
max_n94906265
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This checker takes a single non-negative integer n, computes n squared with exact integer arithmetic, counts the decimal digits of n, tests whether the square ends with n, and returns both the boolean verdict and the square so you can audit the ending digits. The free browser tool and the API share one pure function, so interactive checks and automated pipelines never silently diverge.

How the automorphic test and n squared are computed

When the congruence holds, is_automorphic is true; otherwise it is false. The response always includes the full square as n_squared so students and scripts can compare the trailing digits by eye or assert equality without re-squaring. Classic checks: n equals five yields n_squared twenty-five and is_automorphic true; n equals seven yields forty-nine and false; n equals twenty-five yields six hundred twenty-five and true; n equals seventy-six yields five thousand seven hundred seventy-six and true; n equals ten yields one hundred and false because one hundred does not end in ten.

What you send and what you get back

The error for negatives states that n must not be negative so form clients and scripts can correct the input without guessing. Because the engine is pure parse work, the same n always produces the same object with no model drift and no stored state between calls. Wire the free browser tool for homework and quick sanity checks, then call the identical contract from scripts when you need bulk verification of candidate automorphic values. Provide a required non-negative integer under the field n, or the aliases number, value, or integer. Values that are missing, non-integers, negative, or larger than the supported maximum (so that n squared would leave the safe-integer range) are rejected with invalid_input and are not charged. On success the response includes the normalized n, n_squared as the exact product n times n, digit_count as the number of decimal digits used in the ends-with test, and is_automorphic as a boolean. Example checks: n equals twenty-five yields digit_count two, n_squared six hundred twenty-five, is_automorphic true; n equals seven yields digit_count one, n_squared forty-nine, is_automorphic false; n equals zero yields n_squared zero and is_automorphic true; n equals three hundred seventy-six yields digit_count three and is_automorphic true.

Where automorphic checks show up in real work

Recreational number-theory write-ups and blog posts cite automorphic numbers alongside perfect numbers and Kaprekar numbers; a stable API endpoint keeps interactive demos honest. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Contest and homework fixtures

Verify whether n is automorphic and capture the exact square for olympiad problems and classroom answer keys.

Numeric structure checks in pipelines

Apply a deterministic automorphic flag and n_squared to identifiers or generated values that need a simple modular gate.

What does the n_squared field mean?

It is the exact product n times n. Use it to inspect the trailing digits or to assert the modular condition n_squared mod 10^digit_count equals n.

Are zero and one automorphic?

Yes. 0² = 0 and 1² = 1, so both end with themselves and is_automorphic is true.

Read the full KIT documentation →