Solution:
If x=y=1 then p divides
219−2=2(218−1)=2(29−1)(29+1)=2⋅511⋅513=2⋅33⋅7⋅19⋅73
If x=2, y=1 then
p∣319−219−1
We will show that 319−219−1 is not a multiple of 73. Indeed,
319≡33⋅(34)4≡33⋅84≡33⋅(−9)2≡27⋅81≡27⋅8≡70(mod73)
and
219≡2⋅643≡2⋅(−9)3≡−18⋅81≡−18⋅8≡−144≡2(mod73)
Thus p can be only among 2,3,7,19. We will prove all these work.
- For p=19 this follows by Fermat's Theorem as
(x+y)19≡x+y(mod19),x19≡x(mod19),y19≡y(mod19)
- For p=7, we have that
a19≡a(mod7)
for every integer a. Indeed, if 7∣a, it is trivial, while if 7∤a, then by Fermat's Theorem we have
7∣a6−1⟹7∣a18−1
therefore
7∣a(a18−1)
- For p=3, we will prove that
b19≡b(mod3)
Indeed, if 3∣b, it is trivial, while if 3∤b, then by Fermat's Theorem we have
3∣b2−1⟹3∣b18−1
therefore
3∣b(b18−1)
- For p=2 it is true, since among x+y, x and y there are 0 or 2 odd numbers.