Compositorial Calculator
Composites
- The compositorial of n is the product of all composite numbers up to n; for 10 those are 4, 6, 8, 9, 10.
- Multiply them in order; 1 is neither prime nor composite, so the product starts at 4, the first composite number.
- The product is 17,280, built from 5 composite factors.
- It is the composite-side counterpart of the primorial: where the primorial multiplies primes, the compositorial multiplies everything the primorial leaves out.
The primorial multiplies the primes up to n. The compositorial asks the mirror-image question: what do you get if you multiply everything the primorial leaves out - all the composite numbers up to n? The answer grows startlingly fast, because composites quickly outnumber primes, and each factor is a whole composite integer rather than a small prime.
This calculator computes the compositorial exactly, in big-integer arithmetic, and shows the factor list, the factor count and the previous value for comparison. The anchor example: up to 10 the composites are 4, 6, 8, 9 and 10, and their product - the compositorial of 10 - is 17,280.
Two features of the output are worth watching. The factor count tells you how many composites went into the product - five at n = 10, eight at n = 15 - and the compositorial of n - 1 is shown alongside, so the jump made by the newest factor is visible at a glance. When n is itself composite, the ratio of the two values is exactly n; when n is prime, the two values are identical, and that plateau is itself the signature of a prime bound.
Worked examples
Compositorial of 10
(10)
| compositorial of 10 | 17,280 |
| composite numbers multiplied | 4, 6, 8, 9, 10 |
| how many composite factors | 5 |
| compositorial of n - 1 | 1,728 |
Compositorial of 6
(6)
| compositorial of 6 | 24 |
| composite numbers multiplied | 4, 6 |
| how many composite factors | 2 |
| compositorial of n - 1 | 4 |
Compositorial of 15
(15)
| compositorial of 15 | 43,545,600 |
| composite numbers multiplied | 4, 6, 8, 9, 10, 12, 14, 15 |
| how many composite factors | 8 |
| compositorial of n - 1 | 2,903,040 |
What the compositorial multiplies
The compositorial of n, written comp(n) here, is the product of all composite numbers from 4 up to n. The list starts at 4 because 1 is neither prime nor composite - it belongs to neither product - and 4 is the first composite number. Prime values of n add nothing: the compositorial of 7 equals the compositorial of 6, which is 24, because no new composite appears between them.
The first values set the tone: comp(6) = 24 from just two factors (4 x 6), comp(10) = 17,280 from five factors, and comp(15) = 43,545,600. Each new composite multiplies the running total by itself, so the growth compounds twice over - more factors, and bigger ones.
A concrete way to feel the definition: list the integers from 2 to 15 and cross out the primes 2, 3, 5, 7, 11, 13. What remains - 4, 6, 8, 9, 10, 12, 14, 15 - is the factor list of comp(15), and multiplying those eight numbers in order, keeping every digit, lands on 43,545,600. The crossing-out is the entire algorithm; the difficulty is only in the size of the arithmetic, which is why the exact-integer machinery matters more than the idea.
One more value fixes the growth in the hand: comp(12) multiplies the composites 4, 6, 8, 9, 10, 12 to give 207,360 - and comp(11) equals comp(10) = 17,280, because 11 is prime and contributes nothing, so the jump from 17,280 to 207,360 happens entirely at the single composite step 12.
- comp(6) = 24 = 4 x 6
- comp(10) = 17,280 = 4 x 6 x 8 x 9 x 10
- comp(15) = 43,545,600
- 1 is neither prime nor composite, so the product starts at 4
Compositorial vs primorial
The primorial p# multiplies the primes up to n; the compositorial multiplies the composites. At small bounds the primorial can lead - there are more small primes than small composites relative to their sizes - but the balance tips quickly. Composites have density approaching 1 among the integers, while primes thin out logarithmically, so at any large bound the compositorial has vastly more factors, each typically larger than the corresponding prime factor of the primorial.
The two products are complementary halves of the factorial. Every integer from 2 to n is either prime or composite, so the factorial splits exactly: n! = primorial(n) x compositorial(n). At n = 10 the split is 3,628,800 = 210 x 17,280 - the primorial contributes the thin spine of primes 2 x 3 x 5 x 7 = 210, and the compositorial contributes the dense body of everything else. Neither factor is a rounding of the other; the identity is exact at every n.
The plateau-and-jump rhythm has one more consequence worth noticing: the ratio comp(n)/comp(n - 1) is 1 at every prime and n at every composite, so the compositorial's difference pattern encodes the characteristic function of the composites exactly. A table of compositors is, in disguise, a table of which integers are composite - the product remembers the set it was built from, which is the same memory the factorial identity n! = primorial(n) x compositorial(n) exploits from the other side.
| n | Compositorial of n | Composite factors |
|---|---|---|
| 6 | 24 | 2 |
| 10 | 17,280 | 5 |
| 15 | 43,545,600 | 8 |
Why exact arithmetic matters
Compositorials overflow floating-point arithmetic almost immediately. comp(15) is already 43,545,600, and the values keep multiplying by every composite in range, so a few steps later the product has hundreds of digits. A calculator that rounded to doubles would silently lose the low-order digits - the exact answer is the entire point of the sequence.
This calculator therefore multiplies in arbitrary-precision integers and reports the full product, the number of composite factors that went into it, and the compositorial of n - 1 so the effect of the last factor is visible. When n itself is composite, the ratio of the two values is exactly n.
- Big-integer multiplication - no rounding, no scientific notation
- The factor list is shown (first eight, with a continuation marker)
- comp(n) / comp(n - 1) = n exactly when n is composite, 1 when n is prime
Edge cases: 1, primes and small n
Below 4 there are no composites at all, so the product is empty and equals 1 by the standard empty-product convention - the calculator reports the factor list as none in that case. At the other extreme of behaviour, prime inputs are plateaus: comp(7) = comp(6) = 24, comp(11) = comp(10) = 17,280, and so on. The sequence only moves at composite arguments.
That plateau structure is a quick sanity check on any compositorial table: the value must be constant between consecutive composites and must jump by exactly the new composite at each composite step. If a table shows a change at a prime, it is wrong.
The plateau property has a converse worth stating: if comp(n) differs from comp(n - 1), then n is certainly composite, and the ratio of the two values is n itself. So a compositorial table doubles as a compositeness detector for its own bound - crude compared with any real primality test, but exact, and a satisfying illustration of how much information a single product can carry about the range it summarises.
Plateaus, jumps and what the shape tells you
Graph the compositorial and you get a staircase: flat across every prime, jumping at every composite. As numbers grow, primes thin out and composites become denser, so the jumps come more and more frequently while the plateaus shrink to single primes. The staircase steepens relentlessly, which is the visual form of the statement that composites dominate the integers.
The jump sizes carry information too. At a composite step c, the product multiplies by exactly c, so the ratio comp(n)/comp(n-1) reads off the newest factor directly. A table of compositorials can therefore be audited factor by factor: any entry whose ratio to its predecessor is neither 1 nor the argument itself is wrong. Few sequences offer so simple a self-check.
It is also worth seeing how the compositorial reframes a familiar object. The factorial is usually introduced as the canonical fast-growing product, but split it by primality and the composite side does almost all of the growing at scale: the primorial contributes a thin spine of primes, the compositorial contributes the dense body of everything else.
- Flat at primes, jumps by exactly the new factor at composites
- comp(n) / comp(n - 1) is either 1 (n prime) or n (n composite)
- Factor count: 5 composites up to 10, 8 up to 15
Reading a compositorial table critically
The exact identity n! = primorial(n) x compositorial(n) gives the compositorial a second job: it is the part of the factorial that remains after the primes are divided out. Anything proved about factorials - divisibility, trailing zeros, size estimates - can be split into a prime part and a composite part, and the composite part is this sequence. When a factorial identity feels mysterious, checking which side of the split drives it is often the clarifying move.
The identity also supplies the strongest audit of any compositorial computation. Multiply the reported compositorial by the primorial of the same bound - a short product of small primes - and the factorial must come out exactly, digit for digit. This calculator's values pass that audit by construction, since the factor list is printed and can be re-multiplied independently.
Finally, the split explains the growth rates in one line. The primorial of n grows roughly like e^n; the factorial grows faster than any exponential in n; so the compositorial, as the quotient, must supply the super-exponential bulk. The composite integers are not a thin residue left after the interesting primes - multiplicatively, they are almost the whole story.
- Audit identity: primorial(n) x compositorial(n) = n! exactly
- At n = 10: 210 x 17,280 = 3,628,800
- The compositorial supplies the super-exponential bulk of n!
FAQs
What is the compositorial of 10?
17,280 - the product 4 x 6 x 8 x 9 x 10 of the five composite numbers up to 10.
What is the difference between the compositorial and the primorial?
The primorial multiplies the primes up to n; the compositorial multiplies the composite numbers up to n - everything the primorial leaves out. Because composites quickly outnumber primes, compositorials grow much faster at the same bound.
Why does the compositorial start at 4?
1 is neither prime nor composite, and 2 and 3 are prime, so 4 is the first composite number and the first possible factor. Below 4 the product is empty and equals 1.
What is the compositorial of 15?
43,545,600. The running product grows very fast because each step multiplies by a whole composite number, not by a small increment - which is why the calculator uses exact big-integer arithmetic.
Is the compositorial of a prime different from the previous value?
No. A prime adds no new composite factor, so the compositorial stays flat: comp(7) = comp(6) = 24 and comp(11) = comp(10) = 17,280. The sequence only changes at composite arguments.
How is the compositorial related to the factorial?
Exactly: every integer from 2 to n is prime or composite, so n! = primorial(n) x compositorial(n). At n = 10 that is 3,628,800 = 210 x 17,280 - the primorial supplies the primes, the compositorial supplies everything else.