ForHosting KIT · Math

Digitadition generators

101 has two generators, 91 and 100, because 91 + 10 and 100 + 1 both equal 101. Enter a positive whole number to list every generator in ascending order, or learn that it is a self number. 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
101
You get
Generators
91, 100
Quantity
2

Digitadition is D. R. Kaprekar’s name for adding a positive integer to the sum of its own decimal digits. A generator of n is any integer m that satisfies m plus the digit sum of m equals n; numbers with no such m are self numbers. Students, contest programmers, and curriculum authors often need the full list of generators for a given n, not only a yes-or-no self-number flag.

What digitadition generators are and why the search is short

Write s(m) for the sum of the decimal digits of a non-negative integer m. Digitadition maps m to m plus s(m). A generator of a positive integer n is any m such that m plus s(m) equals n.

Rearranging gives m equals n minus s(m), so every generator is strictly smaller than n because the digit sum of a positive m is at least one, and m equals zero only produces zero. The digit sum cannot grow faster than nine times the number of digits: for any m less than n, s(m) is at most nine times the digit count of n. Therefore every generator lies in the closed integer interval from max of zero and n minus nine times digits of n, up to n minus one.

Checking that window is enough; there is no need to scan from zero to n for large targets. Classic examples: n equals twenty-one has the single generator fifteen because fifteen plus six equals twenty-one; n equals one hundred one has generators ninety-one and one hundred because ninety-one plus ten equals one hundred one and one hundred plus one equals one hundred one; n equals twenty has an empty list and is therefore a self number.

Where listing generators helps

Classrooms and tutoring platforms use a digitadition generators tool so learners can explore Kaprekar’s self numbers without hand-checking every candidate below n. Olympiad and programming-contest trainers need a deterministic oracle that marks self numbers when the generator list is empty and that never invents a generator outside the proven window. Curriculum generators walk ranges of n, collect self numbers, and build worksheets that ask students to list all generators of selected targets.

Invalid input does not consume balance.

Classroom self-number checks

Let students submit n and see every generator m with m plus digit sum equal to n, or confirm that n is a self number when the list is empty.

Curriculum and research batch runs

Walk ranges of n from scripts, collect counts and self-number flags, and build tables or worksheets without reimplementing the scan window.

What is a digitadition generator?

A generator of n is an integer m such that m plus the sum of the decimal digits of m equals n. Example: 15 generates 21 because 15 + 1 + 5 = 21.

What is a self number?

A self number is a positive integer with no generators.

Why must n be at least 1?

Digitadition generators are defined for positive integer targets.

How many generators can n have?

Usually zero, one, or a few. The scan window is only about 9 times the digit count of n long, so the list stays small even for large safe integers.

What does it cost?

The browser tool is free and runs locally.

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/digitadition-generators

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/digitadition-generators \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":101}'
{
  "n": 101
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.digitadition_generators",
  "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.

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 capability accepts a positive integer n, scans the short proven window of candidates near n, and returns every generator in ascending order together with a count and an is_self_number flag.

What digitadition generators are and why the search is short

The algorithm is fully deterministic: the same n always yields the same ordered generators array, the same count, and the same is_self_number boolean, with no randomness, no network, and no clock dependence.

Input contract, response shape, and error behaviour

The message for sub-one targets states that n must be at least one, matching the mathematical domain of positive digitadition targets. Failed validation is not billed. POST a JSON object with a required positive integer field n. Aliases number, value, and target are accepted with the same meaning. The value may arrive as a JSON number or as a digit-only string with an optional leading sign; empty strings, missing fields, non-integers, non-finite values, and any n strictly less than one fail with invalid_input. On success the body echoes the normalized n, returns generators as an ascending array of integers, count as the length of that array, is_self_number as true exactly when the array is empty, and a short formula string restating m plus digit_sum of m equals n. Safe-integer limits apply: n must not exceed JavaScript’s maximum safe integer so every digit extraction stays exact in IEEE-754 doubles. Example checks you can pin in tests: n equals one hundred one yields generators ninety-one and one hundred with count two and is_self_number false; n equals twenty-one yields generators containing only fifteen; n equals twenty yields an empty generators array, count zero, and is_self_number true; n equals one is also a self number. Pair the JSON with your own worksheet prose if you need step-by-step digit expansions; this endpoint only emits the generator list and metadata.

Where a digitadition generators API earns its keep

Research notebooks that study the density of self numbers can batch-call the API and store the count field without reimplementing digit-sum loops in every language.

Contest and LMS auto-grading

Mark digitadition and self-number problems with a deterministic oracle that returns the full ordered generator list, not only a boolean flag.

Read the full KIT documentation →