When I saw a math paper with the phrase “almost prime” in the title, I thought it sounded pretty funny. It reminded me of the joke about how you can’t be a little bit pregnant. On further thought, though, it seems like someone whose pregnancy is 6 weeks along and who hasn’t yet noticed a missed period is meaningfully less pregnant that someone rounding the bend at 39 weeks who can balance a dinner plate on their belly. Perhaps “almost prime” could make sense too.

A number is prime if its only factors are 1 and itself. By convention, the number 1 is not considered to be prime, so the primes start 2, 3, 5, 7, 11, and so on. Hence, a prime number has one prime factor. A number with two prime factors, like 4 (where the two factors are both 2) or 6 (2×3) is definitely less prime than a prime number, but it kind of seems more prime than 8 or 30, both of which have three prime factors (2×2×2 and 2×3×5, respectively). The notion of almost primes is a way of quantifying how close a number is to being prime.

A number is 2-almost prime or semiprime if it has two (not necessarily distinct) prime factors. That list, which has some beauties on it, starts 4, 6, 9, 10, 14, 15. A number is 3-almost prime (triprime) if it has at most three prime factors, 4-almost prime if it has at most four prime factors, and so on. All whole numbers greater than 1 are n-almost prime for some *n*. (The number 1 itself is not prime or almost prime. It is outside of the realm of primeness.) In terms of qualitative primey-ness (a term that I just made up), almost primes work more like golf than pregnancy. A 2-almost prime seems primey-er than a 3-almost prime.

So far it seems we’ve found a fancy way of talking about many factors a number has. What’s the point of almost primes?

Mathematicians have a lot of questions about prime numbers, and some of them are hard. The set of prime numbers can be slippery. Though they are anything but random, mathematicians sometimes describe them as acting random; on the other hand, certain aspects of their behavior are very predictable. The prime number theorem states that the average gap between prime numbers increases without bound as you go out on the number line, but recent work towards the twin prime conjecture shows that there are infinitely many pairs of primes that differ by only 246. (A proof of the twin prime conjecture itself would show that there are infinitely many pairs of primes that differ by only 2.)

With their enigmatic behavior, the primes can be difficult to manage. So to make progress towards open questions in number theory, mathematicians sometimes need to relax the rules. Instead of trying to answer a question about just the set of prime numbers, what happens if we open the door and let the 2-almost primes in too? Or the n-almost primes for some other *n*?

Take arithmetic progressions in primes. This is a question of whether there are arbitrarily long sequences where, say, a number *a, a+6, a+12, a+18*, for several steps are all prime. (An *arithmetic progression* is just a series of evenly-spaced numbers, so the 6, 12, 18, and so on can be replaced by multiples of another number.) In 2004, Ben Green and Terence Tao proved that yes, there are primes in arbitrarily long arithmetic progressions, and they did this by relaxing the restriction that they were only looking at prime numbers. Leading up to their work, other researchers had made progress looking at sets of primes and almost primes. More recently, 31-almost primes made an appearance in work related to the twin prime conjecture and questions about the prevalence of other tuples of prime numbers.

Even though almost primeness is not a mathematical joke, it still amuses me. “Almost primes in almost all short intervals?” Comedy gold! But it turns out this property can help mathematicians get a foothold on some challenging problems in number theory.