Instantly check divisibility, find all factors (divisors), test primality, and visualize factor pairs with an interactive rainbow diagram.
In number theory, divisibility is a fundamental relation between integers. We say that an integer d divides n (written d | n) if there exists an integer k such that n = d · k. In other words, dividing n by d leaves no remainder. This simple idea underpins much of arithmetic, from elementary school math to advanced cryptography.
The divisibility test is the process of determining whether one integer divides another without performing long division. Over centuries, mathematicians have developed a rich set of divisibility rules—quick mental checks that let you decide divisibility by small numbers in seconds. For example, a number is divisible by 3 if the sum of its digits is divisible by 3; by 5 if it ends in 0 or 5; by 11 if the alternating sum of its digits is divisible by 11.
d | n ⟺ n = d · k for some integer k
The fundamental definition of divisibility.
Master the most useful divisibility rules for quick mental arithmetic and problem‑solving:
Divisibility Check : The calculator performs a simple modulo operation: n % d === 0. If the remainder is zero, d divides n; otherwise, it does not. The quotient and remainder are displayed for clarity.
Factor Finding : To enumerate all divisors of n, the tool iterates from 1 to √n. For each i that divides n, both i and n/i are recorded. This efficient method runs in O(√n) time, making it practical for numbers up to 1012.
Prime Checking : A number n > 1 is prime if it has no positive divisors other than 1 and itself. The tool tests divisibility by all integers from 2 to √n. If none divide evenly, n is declared prime. This is the classic trial‑division algorithm, accurate and easy to understand.
Factor Rainbow : The interactive canvas visualizes factor pairs as arcs. Factors are arranged along a horizontal axis; each pair (a, b) with a · b = n is connected by a semicircular arc. Perfect squares have a single middle point. This intuitive display helps students grasp the symmetry of multiplication.
The following results have been verified against independent mathematical sources and are fully reproducible with this tool.
| Number (n) | Divisors (factors) | Prime? | Divisibility Highlights |
|---|---|---|---|
| 12 | 1, 2, 3, 4, 6, 12 | No | Divisible by 2, 3, 4, 6 |
| 100 | 1, 2, 4, 5, 10, 20, 25, 50, 100 | No | Perfect square, divisible by 4, 25 |
| 144 | 1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 36, 48, 72, 144 | No | Highly composite, 15 divisors |
| 997 | 1, 997 | Yes | Largest prime under 1000 |
| 1024 | 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 | No | Power of 2 (210) |
| 360 | 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360 | No | Refactorable, 24 divisors |
| 49 | 1, 7, 49 | No | Perfect square (72) |
| 17 | 1, 17 | Yes | Prime, Fermat prime |
Modern public‑key cryptography (e.g., RSA) relies on the difficulty of factoring large composite numbers. The security of RSA depends on the fact that multiplying two large primes is easy, but factoring their product is computationally infeasible. Tools like this divisibility calculator help students and researchers explore the properties of primes and composites, building intuition for the number‑theoretic foundations of cybersecurity. For instance, the prime 997 is small enough to test manually, but the same principles apply to 2048‑bit primes used in real‑world encryption.
Every integer greater than 1 is either a prime number or can be expressed uniquely as a product of prime numbers (up to order). This is the Fundamental Theorem of Arithmetic, first proved by Euclid around 300 BCE. The theorem guarantees that prime factorization is unique, making primes the “atoms” of the integer universe. Our factor‑finding tool is a practical demonstration of this theorem: it lists all divisors, which are exactly the products of subsets of the prime factorization.
For example, 144 = 24 · 32. Its divisors are all numbers of the form 2a · 3b where 0 ≤ a ≤ 4 and 0 ≤ b ≤ 2 — exactly the 15 divisors listed in the table above.