## Unique Factorization Pathologies

Sometime in the last hour and a half I got a Google hit on integer that is both a square and a cube. Never one to fail people who read my blog, I feel I should talk a bit about it.

First, in the ring of integers Z, like in all other unique factorization domains, it’s simple: an element is both a square and a cube if and only if it’s a sixth power. Examples of integers that are both squares and cubes are then 1, 64, 729, 4096, and 15625.

However, without unique factorization, it’s more complicated. Take the ring Z[x], the ring of all polynomials with integer coefficients. That ring has unique factorization, by a theorem that says that if R is a UFD, then so is R[x]. But we can take the set of all elements in Z[x] whose x-coefficient is 0, such as 7, x^2 – 5, x^5 + x^4 – x^3, etc.; this set forms a subring of Z[x] because we can still add, subtract, and multiply in it. In that ring, we naturally have x^6 = (x^2)^3 = (x^3)^2, but since x is not in the ring, x^6 is not a sixth power.

We could say that x is in some way in that ring, because it’s x^3/x^2. In fact there’s a formal construction, the fraction field, that allows us to say it. But then we’re going to run into the opposite problem: if you take elements whose x-, x^2-, and x^3-coefficients are all 0, which still form a ring, then x^6 won’t be a cube or a square, but x = x^5/x^4 will be in the fraction field and then x^6 will be a sixth power.