ForHosting KIT · Math

Amicable numbers checker

220 and 284 are amicable: the proper divisors of 220 add up to 284, and those of 284 add up to 220. Enter any two positive whole numbers to see both sums and a clear verdict. 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
A
220
B
284
You get
Aliquot sum a
284
Aliquot sum b
220
Ordered
220, 284

Amicable numbers are a celebrated idea in classical number theory: two distinct positive integers form an amicable pair when each equals the sum of the proper divisors of the other. Proper divisors are all positive divisors except the number itself; their sum is called the aliquot sum. The smallest and most famous pair is two hundred twenty and two hundred eighty-four. This checker takes two positive integers, computes both aliquot sums with exact integer arithmetic, and reports whether the pair is amicable. Equal perfect numbers are flagged separately so you can tell classical amicability from the perfect case at a glance.

What amicable numbers and aliquot sums mean

Fix a positive integer n. Its proper divisors are every positive integer that divides n except n itself. For example, the proper divisors of two hundred twenty are one, two, four, five, ten, eleven, twenty, twenty-two, forty-four, fifty-five, and one hundred ten; they add to two hundred eighty-four.

The proper divisors of two hundred eighty-four are one, two, four, seventy-one, and one hundred forty-two; they add to two hundred twenty. Because each aliquot sum recovers the other value and the two numbers are distinct, the pair is amicable. If a number equals its own aliquot sum, it is perfect rather than part of an amicable pair; six and twenty-eight are the classic perfect examples.

Sociable chains of length greater than two generalize the same aliquot map but are outside the scope of a two-input pair test. The definition used here is the standard one taught in recreational number theory and contest problem sets: s(a) equals b, s(b) equals a, and a is not equal to b, where s denotes the aliquot sum. That three-part rule cleanly separates amicable pairs from perfect numbers and from casual pairs that merely share a factor sum by coincidence on one side only.

How this checker evaluates a candidate pair

Call the capability with integer fields a and b, each at least one and at most the published upper bound. The implementation validates that both values are present, finite, integral, and not below one. It then computes the aliquot sum of each argument with an O square-root trial loop: every divisor d up to the integer square root contributes d and, when distinct, the complementary quotient, while the number itself is never added.

One is handled as a special case whose aliquot sum is zero because it has no proper divisor other than the empty set of candidates after exclusion of itself.

Homework and contest verification

Students and graders can confirm whether a candidate pair is amicable and inspect both aliquot sums without a local computer-algebra system.

Recreational number-theory demos

Lesson pages that introduce proper divisors can show the classic 220–284 pair beside other candidates and highlight perfect numbers as the equal case.

What happens if either number is below 1?

Amicable pairs are defined for positive integers only; values below 1 are rejected and not charged.

Is the amicable numbers checker free?

The browser tool runs free on your device.

What is an aliquot sum?

The aliquot sum of n is the sum of all positive divisors of n except n itself. Amicable pairs are exactly those distinct a and b where each is the aliquot sum of the other.

What is the smallest amicable pair?

It is 220 and 284. The proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110, which add up to 284, and those of 284, namely 1, 2, 4, 71 and 142, add up to 220.

What happens if I enter the same perfect number twice?

The pair is not called amicable, because the two numbers must be different. A perfect number such as 6 or 28 equals its own divisor sum, so the result flags it separately as a perfect case.

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/amicable-numbers

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/amicable-numbers \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":220,"b":284}'
{
  "a": 220,
  "b": 284
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.amicable_numbers",
  "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_n1000000000000
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.

How this checker evaluates a candidate pair

The engine compares the two sums against the opposite inputs and also records whether a equals b with a self-matching aliquot sum, which surfaces as is_perfect_pair rather than is_amicable. The response returns a, b, aliquot_sum_a, aliquot_sum_b, both booleans, and an ascending ordered pair for stable presentation in tables or sorted lists. Inputs below one, non-integers, missing fields, and values above the maximum fail with invalid_input and are not charged.

Practical use, limits, pricing, and delivery

Use the browser tool when you want an immediate amicable-pair check while studying aliquot sequences, verifying a textbook exercise, or demonstrating proper-divisor sums without installing a computer-algebra system. Results are fully deterministic: the same a and b always yield the same aliquot sums, the same amicable flag, and the same ordered pair. There is no language model, no external arithmetic service, and no randomness, so the capability is safe to pin in automated tests and reproducible notebooks. Each successful request is one billable item at $0.002; failed validation does not consume balance. Accepted inputs are positive integers up to one trillion so classroom examples and known historical pairs remain representable as exact JSON numbers. Wire the endpoint into number-theory demos, contest graders, aliquot-sequence explorers, or preprocessing steps where you already trust exact divisor arithmetic more than approximate heuristics or opaque black-box calculators that hide intermediate sums.

Automated aliquot-pair pipelines

Scripts that filter candidate integer pairs can call a deterministic item-priced endpoint instead of embedding ad hoc divisor loops in every service.

How do I check if two numbers are amicable with this API?

Send a JSON body with positive integer fields a and b to the numth.amicable_numbers capability. The response returns is_amicable plus both aliquot sums so you can audit the comparison.

Is 6 and 6 considered amicable?

No. When a equals b and each equals its own aliquot sum, the result sets is_perfect_pair true and is_amicable false, matching the classical requirement that amicable partners are distinct.

Read the full KIT documentation →