An application of Galois theory to elementary arithmetic