## #math trivia #241 solution

A number is either prime or it isn’t, so the behavior of an adjacent number can’t make it more or less likely that a given number n is prime, or that both n and n+2 are prime — a prime pair.

But this would be too literal an answer.  It’s already stated that 241 and 239 are twin primes, so the question should be interpreted more broadly.  The question is really whether it’s more likely that a random number n of a given size is prime, as well as n+2, when n+1 is highly composite — like 240 is — than when there’s no constraint on n+1. In other words, does n+1 being highly composite make a difference?

The answer is yes. A highly composite number, by definition, has more divisors than any smaller number. This means that it also has more divisors, on average, than a random number of the same size. If n+1 has more divisors than average, then it follows — at least as a sketch of a proof — that n and n+2 each have fewer divisors than average, and therefore are more likely both to be primes.  The reason is that if a positive divisor d > 1 divides n+1, it can’t also divide n and n+2.  The highly composite number in the middle draws divisors away from its neighbors.

A simpler approach is to observe that all highly composite numbers (other than 1) are even. If n is random, then n is equally likely to be even or odd, and we know that even numbers aren’t prime (except for n = 2). But if n+1 is highly composite, n+1 must be even.  Thus n and n+2 must be odd, which makes them more likely to be prime than if they could be either even or odd.