ForHosting KIT · Developer Utilities

Aliquot sequence calculator

An aliquot sequence begins with a positive integer and repeatedly replaces the current term with the sum of its proper positive divisors.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

This calculator performs that iteration deterministically, reports every term it reaches, and stops when it uses the requested step limit, reaches zero, or detects a repeated value. A strict safe bound protects the calculation from unexpectedly large intermediate terms, making the result suitable for experiments, lessons, validation scripts, and reproducible number-theory workflows.

Choose the starting value and understand each transition

Enter a positive whole number as start and choose a step_limit from 1 through 100. The starting value is always the first item in the returned sequence. Each permitted transition then replaces the most recent term with its aliquot sum: the sum of every positive divisor smaller than the number itself. For example, the proper divisors of 12 are 1, 2, 3, 4, and 6, so the next term is 16. The proper divisors of 16 are 1, 2, 4, and 8, making the following term 15. Because the limit counts transitions rather than displayed values, a limit of ten can return at most eleven sequence entries. It may return fewer when a natural stopping condition appears. This convention keeps the requested computational effort unambiguous and makes it easy to compare the output with a hand calculation, classroom worksheet, database record, or another mathematical implementation. Aliases such as n, number, or value may supply the start in API integrations, while steps may supply the limit.

Read the termination and cycle information

The result includes the complete sequence produced during the request, the number of transitions actually completed, and a termination label. A label of step_limit means the calculator completed every requested transition without encountering an earlier stopping condition. A label of zero means the sequence reached zero; this commonly follows 1 because 1 has no proper positive divisors. A label of cycle means a newly calculated value was already present. The repeated value is included as the last sequence entry so the cycle is visible, and cycle_start_index identifies its earlier zero-based position. Perfect numbers therefore produce an immediate one-value loop: starting at 6 gives 6, 6 and points back to index zero. For non-cyclic results, cycle_start_index is -1, providing a stable response shape without a nullable field. Cycle detection avoids wasting the remaining step allowance on repetitions while preserving enough information to reconstruct the periodic portion and distinguish it from the nonrepeating lead-in.

Work safely with large terms and reproducible results

Every starting value must be no greater than the published safe bound of one trillion, and every generated term is checked against that same bound before it is accepted. If an intermediate aliquot sum exceeds the bound, the request returns an invalid-input error that names the transition where growth became unsafe. The calculator never truncates, rounds, or silently substitutes a smaller number, because doing so would create a sequence that is mathematically false. Internally, each aliquot sum is found by deterministic integer factorization and the multiplicative divisor-sum formula. There is no network access, random choice, current-time dependency, or stored state, so identical input produces identical output in the browser and through the API. Use a modest step limit when exploring an unfamiliar start, then increase it when the observed terms remain manageable. The API price is $0.002 per request. The item unit describes one requested calculation; the explicit term and step limits bound the work performed within it.

Explore number-theory behavior

Follow a starting integer through successive proper-divisor sums and see whether it falls to zero, cycles, or continues.

Check teaching exercises

Compare a student or textbook sequence with a deterministic list that clearly states how many transitions were completed.

Test mathematical software

Use bounded, stable output as a reference when validating another aliquot-sequence implementation or data pipeline.

What is an aliquot sequence?

It is a sequence in which each new term equals the sum of the previous term's proper positive divisors.

Does the step limit include the starting number?

No. It counts divisor-sum transitions, so a limit of ten can produce at most eleven displayed terms including the start.

Why can the sequence stop before the limit?

The calculator stops early when it reaches zero or generates a value that already appeared, because further terms would be zero or cyclic repetitions.

What happens when a term is too large?

The request fails with an invalid-input error instead of returning a partial or numerically unsafe sequence.

How much does an API request cost?

Each API request costs $0.002. The same deterministic logic can also run in the browser.

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/aliquot-sequence

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/aliquot-sequence \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"start":12,"step_limit":10}'
{
  "start": 12,
  "step_limit": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.aliquot_sequence",
  "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.

max_term1000000000000
max_steps100
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.

Read the full KIT documentation →