Cloudy, 52° Complete Forecast
Rate this
Weekly Brain Teaser: Prime numbers

There is exactly one pair of prime numbers p and q with the property p+q = (p-q)³. What are they?

If someone were to start guessing prime numbers for p and q, starting with the smallest, it probably wouldn't take long to come up with p = 5 and q = 3, which are easily seen to be solutions to this problem. For the sake of this blog, we aren't so interested in what the actual solutions are, but instead, proving that they are the only solutions.

One of the interesting things about proving mathematical facts is that there is often more than one way to go about it. The first proof I came up with for this particular problem was fairly long and involved, but I later came across a much shorter method. What so few people seem to realize is that mathematics actually leaves a lot of room for creativity. We often think of it as a strict set of rules which we must rigidly abide by, which is really not the case when it comes to the theory behind it all. Sure, we have to make sure our methods are logically sound, but more often than not, we can look at a problem from multiple perspectives, ultimately leading to very different pathways to the same result. To illustrate this, I will provide both proofs I came across.

As a quick disclaimer, I should note that the following proofs (especially the first one) will assume a thorough familiarity with basic algebra. In particular, the reader should understand factoring by grouping, difference of squares, perfect square trinomials, and how to combine and simplify rational expressions. Given the length of the proof, I cannot explain each and every step, so the reader is encouraged to look up those algebraic techniques and verify my work for themselves.

Okay, so we are told that p+q = (p-q)³, where p and q are known to be prime numbers. Notice that we can pull one of the p-q factors out and represent this equality as follows

p+q = (p-q)²(p-q)

We will start working with this. Multiplying both sides by p+q gives

(p+q)² = (p-q)²(p-q)(p+q)

which simplifies to

(p+q)² = (p-q)²(p²-q²)

Dividing both sides by (p-q)²:

(p+q)²/(p-q)² = p²-q²

Before we proceed, we need to verify that the last step was valid. As everyone knows, you can't divide by zero, and we haven't actually shown that (p-q)² isn't equal to zero. However, consider what it would mean if this were the case. The only way (p-q)² can equal zero is if p = q. Consider the implications this would have on our original equality p+q = (p-q)³. If p = q, then the right hand side of that equation is 0. However, since prime numbers are always greater than 1 by definition, the left hand side must be a positive number. Thus, the two sides are not equal to each other, which is a contradiction. So, it is impossible for p and q to be equal to each other, meaning our last step was justified. Picking up where we left off, we solve for q²:

q² = p² - (p+q)²/(p-q)² = [p + (p+q)/(p-q)][p - (p+q)/(p-q)]

And now we come to the first point in the proof where we have to use the fact that q is prime. Since the only factors of q are 1 and q, the only factors of q² are 1, q, and q². What this means is that any factorization of q² must be of the form (q²)(1) or (q)(q). In the equality above, we have found a way to express q² as a product of two factors, namely

p + (p+q)/(p-q) and p - (p+q)/(p-q)

If the product of these two factors is of the form (q)(q), then both factors must be equal to each other. That is,

p + (p+q)/(p-q) = p - (p+q)/(p-q)

Some basic algebra will show that this can only be the case if (p+q)/(p-q) = 0, which is only the case if (p+q) = 0, which we've already shown to be impossible, since both p and q are positive. So, our factorization above couldn't possibly be of the form (q)(q), which means it is of the form (q²)(1). But which factor is q² and which one is 1? Well, since q is greater than 1 by definition, q² must also be greater than 1, making it the larger factor. So we need to determine which of the two expressions above is larger.

To do so, we need another fact about the relationship between p and q, namely, that p>q. Suppose for a moment that q>p. This would mean that p-q is negative, which would mean (p-q)³ is also negative (recall that raising a negative number to an odd power always gives a negative result). In our original equality p+q = (p-q)³, the right hand side would then have to be negative. However, since p and q are both positive numbers, p+q must also be a positive, so the left hand side of that equality would be positive. This means we have a positive equal to a negative, which is impossible. So, it must be the case that p>q.

The reason we needed this fact is because it proves that (p+q)/(p-q) is equal to a positive over a positive, and must be positive itself. Thus, p+(p+q)/(p-q) must be the greater of the two factors given above, which means

q² = p + (p+q)/(p-q), and

1 = p - (p+q)/(p-q)

If we add these equations together, the two rational expressions cancel out and we get

q²+1 = 2p, or equivalently,

p = (q²+1)/2

We have found away to represent the prime number p entirely in terms of the prime number q. So, we can now substitute this value into the original equation p+q = (p-q)³. Doing so and performing some algebraic steps, we have

(q²+1)/2 + q = [(q²+1)/2 - q]³

(q²+2q+1)/2 = [(q²-2q+1)/2]³

(q+1)²/2 = [(q-1)²/2]³

(q+1)²/2 = [(q-1)^6]/8

4(q+1)² = (q-1)^6

0 = (q-1)^6 - 4(q+1)²

0 = [(q-1)³ + 2(q+1)][(q-1)³ - 2(q+1)]

By the zero product property, one of the two factors in the above equality must equal zero. However, since q>1, we see that both (q-1)³ and 2(q+1) must be positive numbers, which means the first factor cannot equal zero. Thus, we have

0 = (q-1)³ - 2(q+1)

0 = q³ - 3q² + 3q - 1 - 2q - 2

0 = q³ - 3q² + q - 3

0 = (q²+1)(q-3)

Using the zero product property again, we see that q²+1 couldn't possibly equal zero, which means q-3 = 0. In other words, q = 3. Using our previously established result about p, we have

p = (q²+1)/2 = (3²+1)/2 = 5.

This proves that q = 3 and p = 5 are the only possible solutions to this week's brain teaser. So what about the shorter proof? Well, recall the previous argument that proved p>q. Since p and q are whole numbers, this means p = q+n for some positive whole number n. Using this representation for p in the original equality, we have

p+q = (p-q)³

q+n+q = (q+n-q)³

2q+n = n³

2q = n³-n

2q = n(n+1)(n-1)

Now, since 2 and q are both prime numbers, any factorization of this number into three factors must be of the form (2q)(1)(1) or (2)(q)(1). The first of these is impossible, since it would require two of the factors to equal 1, and thus equal each other. However, we managed to represent 2q as a product of three consecutive integers n-1, n, and n+1, which means they are all distinct. So, our factorization is of the form (2)(q)(1). Since q is prime and not equal to the other three factors, it must be greater than two. So, we can rearrange these factors from smallest to largest as (1)(2)(q). Since these are consecutive integers, we have q = 3 and n = 2, which means p = q+n = 3+2 = 5.

-Nick Dale, Instructor

E-mail this
Report this

Comments

Change Location:
Even two years later, Brad DeHaven has to turn away when he plays videos of his son shaking and …
The deadline for returning mandated steelhead and sturgeon report cards …
One doctor decided to use his profession to better the lives of some young …
In September 2010, I did the unthinkable: I opened a gourmet cupcake shop …

Contents of this site are all Copyright © 2008, Gold Country Media. All rights reserved. Powered By: Creative Circle Advertising Solutions, Inc.

Privacy Policy  Terms of Service