Lambdia

24 Divides p Squared Minus One, and Primality Is Not What Does It

Factoring into p minus one times p plus one stops the question being about p: the two neighbours are consecutive even numbers so their product carries eight, and one of the three consecutive integers around p is a multiple of three which cannot be p itself. Since eight and three are coprime, 24 divides, and 24 is exactly maximal.

Square a prime above three and subtract one. You get a multiple of 24, every single time. Twenty-five minus one is 24. Forty-nine minus one is 48. A hundred and twenty-one minus one is 120, and a hundred and sixty-nine minus one is 168, which is 24×724 \times 7.

Testing one more prime is the reflex and it never turns into an argument. The proof is short, and the useful part of it is that primality is barely involved.

Stop looking at p

The one move is to factor. A difference of two squares splits:

p21=(p1)(p+1)p^2 - 1 = (p-1)(p+1)
(1)

The question is no longer about pp at all. It is about the two integers either side of pp, and those two are much easier to say things about, because a prime above 3 is squeezed between numbers with guaranteed factors.

Fig. 1 — Two harvests from one picture. The factor 8 comes from the neighbours being consecutive even numbers, and the factor 3 comes from p being forbidden to take it.

Where the 8 comes from

A prime above 2 is odd, so both neighbours are even. Writing p=2n+1p = 2n+1:

p21=(2n)(2n+2)=4n(n+1)p^2 - 1 = (2n)(2n+2) = 4n(n+1)
(2)

Two consecutive integers nn and n+1n+1 cannot both be odd, so their product is even and 4n(n+1)4n(n+1) carries a factor 8. Both parities check out explicitly: if n=2kn = 2k then 4n(n+1)=8k(2k+1)4n(n+1) = 8k(2k+1), and if n=2k1n = 2k-1 then 4n(n+1)=8k(2k1)4n(n+1) = 8k(2k-1).

Said the other way round, p1p-1 and p+1p+1 are consecutive even numbers, so one of the two is a multiple of 4 while the other supplies its own factor 2. Either phrasing gives 8, not merely 4, and that is the step people usually stop one factor short on.

Where the 3 comes from

Among any three consecutive integers exactly one is a multiple of 3. Our three are p1p-1, pp and p+1p+1, and the multiple of 3 cannot be pp, because pp is prime and larger than 3. So it is one of the neighbours, and the product picks up a factor 3.

Parametrically, pp is either 3k+13k+1 or 3k13k-1, and both cases work out:

(3k+1)21=3(3k2+2k),(3k1)21=3(3k22k)(3k+1)^2 - 1 = 3\left(3k^2 + 2k\right), \qquad (3k-1)^2 - 1 = 3\left(3k^2 - 2k\right)
(3)

Putting them together

Both 8 and 3 divide p21p^2-1, and gcd(8,3)=1\gcd(8,3) = 1, so their product does too:

24p21for every prime p>324 \mid p^2 - 1 \qquad \text{for every prime } p > 3
(4)

Coprimality is doing real work in that last step. Two divisors sharing a factor cannot simply be multiplied: 4 and 6 both divide 12, and 24 does not. Here the two factors were harvested from possibly different neighbours, which is fine, because the conclusion is about the product and never about either neighbour on its own.

What was actually used

The proof used only that pp is odd and not a multiple of 3, which is to say gcd(p,6)=1\gcd(p, 6) = 1. Primality is strictly stronger than needed. 25 is composite and 2521=624=24×2625^2 - 1 = 624 = 24 \times 26 all the same, and the same holds for 35, 49, 55 and every other integer coprime to 6.

That reformulation was checked over all 66,666 integers coprime to 6 below 200,000, with more than a hundred composites among the first two thousand of them, so the sweep genuinely separates the hypothesis used from the hypothesis stated.

24 and not more

A statement of the form "always divisible by 24" invites the question of whether 48 or 72 would also work. They would not, and the smallest prime settles it: 521=245^2 - 1 = 24 exactly, so no multiple of 24 beyond 24 itself can divide every member of the family. Formally the greatest common divisor over the whole family is 24 on the nose, and it already collapses to 24 within the first few primes.

gcd(24,48,120,168,)=24\gcd\left(24,\, 48,\, 120,\, 168,\, \dots\right) = 24
(5)

That said, half the primes do better than 24, and it is worth knowing which half. Getting 48 requires 16(p1)(p+1)16 \mid (p-1)(p+1), and since one neighbour contributes only a single factor of 2, the other has to be a multiple of 8. That happens exactly when

p±1(mod8)p \equiv \pm 1 \pmod 8
(6)

So 721=487^2 - 1 = 48 and 1721=288=48×617^2 - 1 = 288 = 48 \times 6 clear the higher bar, while 55, 1111 and 1313 do not. Two of the four odd residues modulo 8 qualify, so roughly half of all primes land on 48. What no prime can do is fail 24, which is the difference between a pattern and a theorem.

The structural reason

There is a cleaner way to see the whole thing, and it explains why 24 rather than some other number. The integers coprime to 24 form a group under multiplication modulo 24, with φ(24)=8\varphi(24) = 8 elements:

{1,5,7,11,13,17,19,23}\{1, 5, 7, 11, 13, 17, 19, 23\}
(7)

Every one of them squares to 1 modulo 24. So the statement is really an observation about this particular group: every one of its elements is its own inverse.

Fig. 2 — Eight residues, eight squares, one answer. Every prime above 3 lands in one of these boxes, so the divisibility is forced before you know which prime you have.

And 24 is the largest modulus with that property. Search every modulus and the complete list of mm for which x21(modm)x^2 \equiv 1 \pmod m holds for all xx coprime to mm is

m{1,2,3,4,6,8,12,24}m \in \{1, 2, 3, 4, 6, 8, 12, 24\}
(8)

which is why 24 appears in this puzzle and 30 or 36 never will. The same question one exponent up has the same flavour: the largest modulus for which every coprime xx satisfies x41x^4 \equiv 1 is 240, and so 240p41240 \mid p^4 - 1 for every prime p>5p > 5. Check it on 7: 741=2400=240×107^4 - 1 = 2400 = 240 \times 10.

Why p greater than 3 cannot be dropped

The condition is necessary, not a convenience. For p=3p = 3 we get 321=83^2 - 1 = 8, which leaves remainder 8 on division by 24, and for p=2p = 2 we get 3. Both fail, and they fail for the reason the proof predicts: 3 is the multiple of 3 among its own three consecutive integers, and 2 is even, so in each case one of the two harvests is unavailable.

Those are the only two exceptions, because they are the only two primes dividing 6. Every prime above 3 is coprime to 6 by force, which is what makes the hypothesis so cheap to state.

One last thing worth being clear about, since the divisibility looks like it might be useful. Turning equation (4) around gives a test: if 24n2124 \nmid n^2 - 1 then nn is not a prime above 3. True, and nearly worthless as a primality test, because the nn it rejects are exactly the ones divisible by 2 or by 3. It is trial division by 2 and 3 wearing a costume. Nothing about the argument ever looked at whether pp had larger factors, so nothing about the conclusion can detect them.

Sources and further reading

The statement was checked over all 148,931 primes between 3 and two million with no exception, and the greatest common divisor over that whole family came out as exactly 24. The two structural facts the picture rests on, that one of two consecutive even numbers is a multiple of 4 and that one of any three consecutive integers is a multiple of 3, were each enumerated over 200,000 cases rather than assumed.

Comments · 0

Be the first to comment.