Primes, GCF, LCM, and factorials: the building blocks hiding in plain sight
Four ideas from a school math class quietly run internet security, explain why some gears click perfectly and others don't, and reveal why a deck of cards has never been shuffled into the same order twice.
None of these four ideas are complicated on their own — a prime number just can't be divided evenly by anything except 1 and itself, GCF and LCM are about shared factors and shared multiples, and a factorial is just "multiply this number by every number smaller than it." What's genuinely interesting is where they show up once you leave the classroom.
Why Prime Numbers Quietly Run Internet Security
Multiplying two large prime numbers together is fast. Taking that result and figuring out which two primes made it is, for large enough numbers, slow enough to be practically impossible with today's computers. That one-way difficulty is the entire foundation of RSA encryption, which secures a huge share of the "https" connections on the web.
Move the slider to watch a simple sieve pick out every prime up to that number — the same basic idea (eliminate multiples, whatever's left is prime) scales all the way up to the hundred-digit primes real encryption uses.
Try it — sieve out the primes
Checking primality by hand gets tedious past small numbers — a prime number checker handles the trial division instantly, however large the number.
Finding Where Two Cycles Line Up: GCF and LCM
The Greatest Common Factor is the largest number that divides evenly into two others — useful for simplifying a fraction down to its lowest terms. The Least Common Multiple is the opposite kind of question: the first point where two repeating cycles land on the same number, which is exactly the math behind "when do two buses on different schedules arrive at the same stop again" or "when do two gears with different tooth counts return to their starting position."
Try it — where do two cycles meet
The green mark is the first shared multiple — that's the LCM. A GCF calculator and LCM calculator solve this instantly for numbers too large to visualize on a number line like this one.
How Fast Factorials Explode
A factorial answers "how many different orders can these things go in." Five books on a shelf can be arranged 5! = 120 ways. A standard deck of 52 cards can be shuffled into 52! possible orders — a number so large that it's a near-mathematical certainty every fair shuffle in history has produced an order that has never existed before and never will again.
Try it — watch factorial growth
Notice how the bar hits its visual limit long before the slider does — that's the point. By 13!, the result already passes 6 billion. A factorial calculator handles these numbers cleanly well past where manual multiplication becomes impractical.
Quick Facts Worth Knowing
- 2 is the only even prime number — every other even number is divisible by 2, which disqualifies it by definition.
- The GCF of any two prime numbers is always 1, since primes share no factors besides themselves.
- 0! is defined as 1, not 0 — a common surprise, but it keeps combinatorial formulas consistent.
- The LCM of two numbers is never smaller than the larger of the two numbers.
Frequently Asked Questions
Explore the tools
Small Ideas, Large Consequences
A prime number, a shared multiple, and a growing product all look like textbook exercises — right up until they turn out to secure a bank login, schedule a bus route, or guarantee that a shuffled deck of cards is, for all practical purposes, one of a kind. The math didn't get more complicated; it just found bigger places to matter.