Highly Composite Number Checker
A highly composite number has more positive divisors than every smaller positive integer.
Run — free
This checker applies that strict record-setting definition to the value you provide, rather than merely deciding whether the value has many factors or is composite. It returns the divisor count for the selected number, the greatest divisor count attained below it, and a direct true-or-false result. That supporting detail makes the decision easy to inspect in lessons, integer-sequence research, programming exercises, and validation pipelines.
What the highly composite test means
A number qualifies only when its count of positive divisors is strictly greater than the divisor count of every smaller positive integer. The word strictly matters. If an earlier value already reached the same count, the later value does not establish a new record and the checker returns false. For example, the method is concerned with record holders in the divisor-count sequence, not with the everyday distinction between prime and composite numbers. The positive integer 1 is included: it has one positive divisor, while there are no smaller positive integers to beat, so it is the first record holder under the standard definition used here. The result includes divisor_count for the submitted value and max_smaller_divisor_count for the best earlier value. Comparing those two fields explains the Boolean answer without requiring trust in an unexplained label. This is especially useful when studying record sequences, where a near miss may have an impressive factorization but still fail because an earlier integer tied or exceeded its divisor count.
How the checker reaches a deterministic answer
The algorithm creates an exact divisor-count table for every positive integer from 1 through the requested value. It visits each possible divisor and increments the count of each multiple, which is the same relationship expressed by saying that a divisor divides a number with no remainder. After the table is complete, the checker scans all entries below the requested value and records the largest divisor count it finds. The submitted number is highly composite precisely when its own count is larger than that earlier maximum. No probabilistic primality test, approximation, remote database, random choice, or clock-dependent value is involved. Identical input therefore produces identical JSON in the browser and through the API. The implementation accepts positive safe integers and digit-only text representing them. It rejects fractions, nonnumeric text, values below one, and inputs above the declared bound. The bound keeps both memory use and the nested arithmetic loops predictable in a browser or edge runtime while remaining large enough for exploration and routine sequence checks.
Reading and using the returned fields
Start with is_highly_composite, the primary decision. When it is true, divisor_count is necessarily greater than max_smaller_divisor_count, showing that the input has established a new record. When it is false, the previous maximum is equal to or greater than the input's count, so the input cannot satisfy the definition even if it has many factors. The response also repeats n, which helps logs and batch jobs keep each decision attached to its source value. For a sequence lesson, submit neighboring integers and watch the maximum remain fixed until a new record arrives. For software tests, assert both the Boolean and the two counts so a regression cannot hide behind a correct-looking label. For data pipelines, treat an invalid-input response as a contract failure rather than a mathematical result; zero and negative integers are outside the domain. Each API request costs $0.002, while the browser version runs locally. Neither route sends a lookup request to an outside number database, and neither changes or stores the submitted integer.
What you can do with it
Explore divisor-record sequences
Test successive positive integers and identify exactly where a new divisor-count record appears.
Check mathematics exercises
Verify a claimed highly composite number and inspect the counts that justify the decision.
Validate generated candidates
Add a deterministic record check to code that proposes candidates from factorizations or integer sequences.
FAQ
What is a highly composite number?
It is a positive integer with strictly more positive divisors than every smaller positive integer.
Does a tie with an earlier number qualify?
No. The input must exceed the previous divisor-count record; matching it is not enough.
Is 1 considered highly composite?
Yes under the definition used here. It has one divisor and no smaller positive integer exists to challenge that first record.
What inputs are accepted?
Provide a positive safe integer from 1 through 1,000,000. Digit-only text is also accepted by the shared solver.
What does the API request cost?
Each API request costs $0.002. The same deterministic checker is available in the browser.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/numth/highly-composite-check \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":12}'const res = await fetch("https://api.kit.forhosting.com/numth/highly-composite-check", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 12
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/numth/highly-composite-check",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 12
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/numth/highly-composite-check", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":12}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":12}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/numth/highly-composite-check", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"n": 12
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "numth.highly_composite_check",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_n | 1000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |