Problem:
Determine the largest positive integer that divides for all primes .
Solution
Solution:
Note that
For we have
For we have
From the last two calculations we find evidence to try showing that is divisible by and this would be the largest positive integer that divides for all primes greater than 7.
By Fermat's theorem, .
Next, since is odd, , hence .
It remains to show that .
Any prime number is 1 or -1 modulo 3.
In the first case both and are divisible by 3, and in the second case, both and are divisible by 3.
Consequently, the required number is indeed 504
Let be a (positive) prime factor of . Then , as . Also, is not 5, as the last digit of is 8.
Hence, the prime factors of are among 2, 3, and 7.
Next, from it follows that the largest integer such that for all primes greater than 7 is at most , and it remains to prove that 504 divides for all primes greater than 7.