0

This question is taken from "An Introduction to Algebraic Number Theory through Olympiad Problems" by Elias Caeiro, p.151

Let $n \geq 2$ be a positive integer. What is the gcd of the numbers $1^n-1,2^n-1, \ldots, n^n-1$ ?

The solution given by the books is as follows:

Solution:

Let $d$ be this gcd. Suppose $p$ is a prime factor of $d$. If $p \leq n$, then $p \mid p^n-1$ which is impossible. Thus $p>n$. Consider the polynomial

$$ X^n-1-(X-1) \cdot \cdots \cdot(X-n) $$

in $\mathbb{F}_p[X]$. It has degree at most $n-1$ and $n$ roots (in $\mathbb{F}_p$ ) by assumption, thus it is the zero polynomial . Hence we have

$$ X^n-1 \equiv(X-1) \cdot \cdots \cdot(X-n) \quad(\bmod p) $$

Expand the RHS and consider the coefficient of $X^{n-1}$; it is $-(1+\ldots+n)=-\frac{n(n+1)}{2}$. On the other hand, since $n \geq 2$, the coefficient of $X^{n-1}$ of the LHS is 0 . Thus

$$ p \lvert\, \frac{n(n+1)}{2}. $$

Since $p>n$, this means $p=n+1$. Thus, if $n+1$ is composite we are already done: the gcd is 1 .

If $n+1=p$ is prime, the gcd $d$ is a power of $p$ and we must find out what it is. Clearly, $p$ is odd.

By Fermat's little theorem, $p \vert k^n-1$ for $k=1, \ldots, n$ so $p \vert d$. It remains to prove that $p^2 \nmid d$.

For this, suppose for the sake of contradiction that $p^2 \vert (p-1)^{p-1}-1$. Then,

$$p \lvert\, \frac{(p-1)^{p-1}-1}{(p-1)^2-1}=\sum_{k=0}^{\frac{p-1}{2}-1}(p-1)^{2 k} \equiv \frac{p-1}{2} (\mod p).$$

which is a contradiction so we are done in this case too: $d=n+1$ if it is prime and 1 otherwise.

My question is: why does the polynomial have $n$ roots in $\mathbb{F}_p$?

I know that a polynomial of degree $n-1$ have $n-1$ roots in $\mathbb{C}$, but I can't make sense of it in $\mathbb{F}_p$

(I am a beginner in algebraic number theory, so forgive me if I don't show much depth of thought on this question)

  • This is a fact from abstract algebra. A non-zero polynomial of degree $d$ over an integral domain has at most $d$ roots. You can prove this by induction on the degree. – George Wood Feb 27 '25 at 17:08
  • but I can't makes sense of it in $\Bbb F_p$. This is the same as for every field. Take $x^2-1$. This is $(x-1)(x+1)$ over $\Bbb F_p$. So we have two roots over $\Bbb F_p$. Sometimes a polynomial has less roots than the degree, and it does depend on the field. For example, $x^2+1$ has no real root, but two roots over $\Bbb F_2$, since then $1=-1$. – Dietrich Burde Feb 27 '25 at 17:13
  • I know that a polynomial of degree −1 have −1 roots in $\Bbb R$ - no, take $f=x^{n-1}+1$. It does not have $n-1$ roots (for $n\ge 3$ odd it even has no real roots). – Dietrich Burde Feb 27 '25 at 17:24
  • See the linked dupe for elaboration on these standard variations of the Factor Theorem. Also note that $,p\mid d\mid a^n-1,$ for $,a = 1,2,\ldots,n\iff x^n-1,$ has roots $,x=1,2,\ldots,n,$ in $\Bbb F_p.\ \ $ – Bill Dubuque Feb 27 '25 at 18:03
  • 1
    Thanks to people who left comments : ) – Ayanami_Rei Feb 27 '25 at 22:38
  • @DietrichBurde You are right, I made a typo; I meant $\mathbb{C}$ – Ayanami_Rei Feb 27 '25 at 22:39

0 Answers0