1

I seem to have found that:

$$k | x^{k} - x, \ \text{for} \ k, x \in \mathbb{Z}.$$

I have tried it with a few values, and it seems to be true.

I am sure that this has been discovered before.

GFauxPas
  • 5,047
Taylor
  • 1,128

2 Answers2

2

In fact, it does not work for all $k, x \in \mathbb{Z}$. Consider $k = 4, x = 2$: $4$ does not divide $2^4 - 2 = 16 - 2 = 14$.

However, this works if $k$ is prime, and is well-known Fermat's little theorem.

lisyarus
  • 15,517
1

Your result only works for all $x$ if $k$ is a prime or a Carmichael number, and it is known as Fermat's little theorem for prime numbers.

But there are more general results known. In rewritten form, the Euler-Fermat theorem states that $$k|x^{\varphi(k)+1}-x$$ if $\gcd(x,k)=1$, and here we have $\varphi(k)$ as the Euler-phi function, equal to $k-1$ if $k$ is prime.

wythagoras
  • 25,026