One of my favorite math problems that is easy to solve with just algebra:
Prove that 8 is the only perfect cube to follow a prime number.
If you don't know what a perfect cube is, that is simple, it is any integer raised to the power of 3. Since \(8 = 2^3\) it is a perfect cube, and it follows the number 7, which is prime. 8 is the only number that fits those conditions... prove it.
NOTE: I will give the answer as a reply. If anyone else wants to provide an answer please make sure you use a content warning.
@freemo is it required to follow a prime as part of the definition?
@Absinthe What do you mean? We are looking for a perfect cube that follows a prime and proving 8 is the **only** one.
@freemo okay, that was my question. My intuition says that it is so, and you say it is so, that is proof enough for me :)
@Absinthe ill provide the answer in a few seconds
@freemo okay and 0 is not prime
Answer
Assume the opposite: some cube a³ = p + 1 for some natural number a ≠ 2 and prime p.
The difference of cubes formula shows that:
p = a³ - 1 = (a² + a + 1)(a - 1)
Both terms (a² + a + 1) and (a - 1) are integers. Since p is prime, it follows that exactly one of the two must be equal to unity.
The first possibility can be ruled out because a² + a + 1 = 1 has no solution in the natural numbers.
The second is impossible because a - 1 = 1 contradicts the assumption a ≠ 2.
Answer
@khird A slightly different wording, but 100% valid all the same, good job :)
Further discussion
The case where a is an integer but not a natural number can be excluded because primes are a subset of the natural numbers. If a < 1, then p = a³ - 1 < 0 which contradicts p's primality.
Further discussion
@khird agreed
Solution
For those who arent on an instance with math rendering you can read the answer here: http://mathb.in/38503
In the language of math the key is in how we frame the question. For example the following will provide some insight as I will show in a momemt.
\(\exists n \in \mathbb{N}\) such that \(n^3 - 1\) is prime
Not everyone understands the above notation so let me rephrase it more simply. The above translates to "There exists a Natural Number, \(n\), such that \(n^3 - 1\) is prime." Remember a Natural Numer is any positive Integer. In this example assuming that the original assertion that "8 is the only perfect cube to follow a prime" then \(n = 2\) which means the prime number, \(7\), is \(2^3 - 1 = 7\), and \(8\) is just \(2^3 = 8\). Easy enough, but how can we prove that this is the only case...
So we really just need to figure out which values for n in the equation above will give us a prime number, then we have our answer. A prime number is any number which only has 1 and itself as its factors. In other words the only two natural numbers we could possibly multiply together to get 7 is 1 and 7. So we have to start by factoring out the above equation \(n^3 - 1\), if we do that we get:
\[(n-1) \cdot (n^2+n+1)\]
It should be immediately obvious that of these two factors the left-most one is the smaller number, so we know:
\[(n-1) < (n^2+n+1)\]
Since we only care about prime numbers which satisfy the equation we know the left hand term must be equal to 1 and the right hand term most be equal to the entire number. So we can likewise assert the following:
\[1 = n-1\]
\[n^3 - 1 = n^2+n+1\]
Now we can use either equation and solve for n. It doesnt matter which equation you solve they will both give you the same value for n. Solving for n we get:
\[n = 2\]
If we plug that into the original equation, as we said earlier, er get the answer of 7, therefore 7 is the only prime number followed by a perfect cube.
\[2^3 - 1 = 7\]