If n is not divisible by 5, then one of , , , must be divisible by 5.
Hence the product must be divisible by 5.
Note however that .
Hence is divisible by 5; in other words .
In general, Fermat's little theorem states that if p is prime and p does not divide n, then .