First note that p = 3 and p = 7 are not solutions, because in each case one term is a multiple of p and the other isn't so the sum isn't a multiple of p.
Now rewrite p^2 + p + 1 as (p-1)(p+2) + 3
x^(p-1) = 1 mod p for all x co-prime to p. Since p is not 3 or 7, any power of 3 or 7 is co-prime to p.
In particular, we can write 3^(p^2 + p + 1) as
3^((p-1)(p+2) + 3)
= 3^3 * (3^(p+2))^(p-1)
That second term is equal to 1 mod p so overall, this term = 3^3 mod p.
Ditto for the 7^(p^2+p+1) term.
Then mod p, the sum is 3^3 + 7^3 = 27 + 343 = 370. Since we want this to be a multiple of p, it must be that 370 = 0 mod p
This in turn demands that p is one of (2, 5, 37)
|
Posted by Paul
on 2024-10-15 16:29:51 |