After explaining one elementary technique in number theory, I should write about what motivates some of the basic ideas of algebraic number theory by means of a somewhat more complicated proof, namely that 26 is the only integer sandwiched between a square and a cube.

In order to find other numbers similarly sandwiched, we need to solve each of the equations *x*^2 + 2 = *y*^3 and* x*^2 – 2 = *y*^3. Apart from a few degenerate solutions in which *x* or *y* is zero, we only know one integer solution: *x* = +/-5, *y* = 3, which corresponds to 25 and 27.

This time, we can’t take quadratic residues, because of that pesky third power. All we can do is tell that *x* and *y* are odd; if one is even and one is odd, then the equations say that an odd number and an even number are equal, whereas if they’re both even, then we have a problem since *y*^3 is divisible by 8, whereas *x*^2 +/- 2 isn’t even divisible by 4.

It would be great if we could factor the left-hand side… which is a problem, since neither 2 nor -2 is a perfect square. But let’s forget about that hurdle for the moment and try factoring anyway.

We have *x*^2 + 2 = (*x* + SQRT(-2))(*x* – SQRT(-2)). So instead of working just with regular integers – which I’ll call rational integers because they’re all rational numbers – we can work with regular integers, plus the square root of -2. In particular, we work with the set {*a* + *b**SQRT(-2): a and b are integers}, consisting of numbers like 5, 3 + SQRT(-2), -3 – 4SQRT(-2), etc. Since it’s possible to add, subtract, and multiply numbers like this normally, this set forms a ring.

Now, let’s look at the two factors, (*x* + SQRT(-2)) and (*x* – SQRT(-2)), a little more closely. In particular, let’s look at any common divisors they have, except the trivial ones 1 and -1. Any common divisor will have to divide their difference, 2SQRT(-2) = -SQRT(-2)^3. So this common divisor is SQRT(-2), 2, or 2SQRT(-2), which is divisible by SQRT(-2).

That means that *x* + SQRT(-2) is divisible by SQRT(-2), or, if you will, that *x* is divisible by SQRT(-2). But *x*/SQRT(-2) = (*x*/2)SQRT(-2), and we’ve already proven that *x* is odd, so there’s a contradiction, and the two factors have no common divisors.

If they have no common divisors, then they’re both cubes. This is fairly common sensical: any prime factor that divides the first factor has to divide *y*^3. So its cube must divide *y*^3, too, which means it divides the first factor, or else the first and second factor are both divisible by that prime.

So there’s a number, call it *a* + *b*SQRT(-2), such that (*a* + *b*SQRT(-2))^3 = *x* + SQRT(-2). Expanding the left-hand side, we get that *a*^3 + 3*a*^2**b*SQRT(-2) – 6*ab*^2 – 2*b*^3*SQRT(-2) = *x* + SQRT(-2). Both the rational-integer and the SQRT(-2) parts must be equal, so we have 3*a*^2**b* – 2*b*^3 = 1, where a and b are rational integers.

Now we have enough to apply simpler tricks. The left-hand side is divisible by *b*, so *b* has to be +/-1. If it’s -1, then we get -3*a*^2 + 2 = 1, or 3*a*^2 = 1, which is absurd since *a* is a rational integer. If *b* = 1, then we have 3*a*^2 – 2 = 1, or 3*a*^2 = 3, which means *a* = +/-1.

If *a* = 1, then (*a* + SQRT(-2))^3 = -5 + SQRT(-2), so *x* = 5. Similarly, if *a* = -1, then *x* = -5. Then *y* = 3 and we get 26.

We can do exactly the same thing with the other equation, only this time we work with SQRT(2). All the steps work exactly the same, only we end up with 3*a*^2**b* + 2*b*^3 = 1. In that case, *b* = 1 gives 3*a*^2 = -1, a contradiction, and *b* = -1 gives 3*a*^2 = -3, another contradiction.

So 26 is really the only number sandwiched between a square and a cube… supposedly. I say “supposedly” because I lied to you a bit – actually, there’s one or two very important things left to check that I didn’t check here. In this case they work, but they don’t have to, and I need to show that they work. But that’s for next time.