0

Let $m \in \mathbb{N}$. Define $$ d_m = \gcd(n^m - n : n \in \mathbb{N}, n \ge 2). $$ For which values of $m>1$ is $d_m > 2$?


Context: This question arose while I was working through an exercise from An Introduction to the Theory of Numbers by Niven, Zuckerman, and Montgomery, which includes the following:

Prove that $n^2 - n$ is divisible by 2 for all integers $n$;
$n^3 - n$ is divisible by 6;
$n^5 - n$ is divisible by 30.

These suggest that $n^m - n$ is divisible by a fixed integer greater than 2 for some small values of $m$ (in these examples it is $2^m-2$). This led me to wonder for which values of $m$ the expression $n^m - n$ is divisible by a common integer greater than 2 for all $n \ge 2$.

After testing computationally, it seems that $d_m > 2$ only occurs for $m = 2, 3, 5$. For larger $m$, the gcd appears to drop to 2 ( but I think this is mostly due to an overflow in the code).

pie
  • 8,483
  • 2
    I don’t know how to parse your gcd expression. – Randall Jun 28 '25 at 00:42
  • I think the point of that exercise is to give a taste of a classical result: if $B_k$ denotes the $k$th Bernoulli number, then $n(n^k-1)B_k$ is always an integer. (But this doesn't answer your question, because we can only apply Clausen–von Staudt when $B_{m-1}\neq 0$, i.e., $m$ odd.) – K B Dave Jun 28 '25 at 00:57
  • 1
    @Randall it is $\gcd(2^m-2. 3^m-3, 4^m-4, \dots)$ is there a better way to write it? – pie Jun 28 '25 at 01:11
  • @pie See in the dupe this global form of little Fermat (a.k.a. Korselt's criterion for Carmichael numbers). $\ \ $ – Bill Dubuque Jun 28 '25 at 01:35

1 Answers1

1

This happens for all odd $m$ since $n^m-n=0 \pmod 3$ as you can check for $n\equiv 0,1$ and $-1\pmod 3$. So $3 \mid d_m$, i.e. $d_m \geq 3$.

It does not hold for any even $m$ since $(-1)^m-(-1)=2$, hence $d_m \mid 2$, i.e. $d_m\leq 2$.

To justify plugging $n=-1$, gcd of all polynomial values (at integers) of degree $m$ is equal to gcd on any consecutive $m+1$ integers, so it does not matter whether we use negative or positive values, the result is the same.

Sil
  • 17,976