# Math Help - modulo on an expression

1. ## modulo on an expression

Hi everybody,

Is there any theorem that shows:

$n^s-1\equiv 0 (mod (s+1))$

when s+1 is prime?

(this is valid for every n>1)

or need to be prooven?

2. Yes, that is Fermat's little theorem. It states that for any prime $p$ and any integer $a$, $a^p \equiv a \mod p$.

3. Originally Posted by gdmath
$n^s-1\equiv 0 (mod (s+1))$

when s+1 is prime?

(this is valid for every n>1)
This (in the form you have written) is not valid for every integer $n>1,$ only when $n$ and $s+1$ are coprime (in which case it is also valid for $n=1).$ However, if you re-write it as $n^{s+1}-n\equiv0\,(\bmod\,s+1)$ then it is valid for every integer $n$ (including 1).

It is more usual to write the prime $s+1$ as $p.$ Thus Fermat’s little theorem is usually presented as $n^{p-1}\equiv1\,(\bmod\,p)$ (which is valid if $\gcd(n,p)=1)$ or $n^p\equiv n\,(\bmod\,p)$ (which is valid for any integer $n).$