To solve the problem, we need to find all triples (p,x,y) where p is a prime number and x and y are positive integers, such that both xp−1+y and x+yp−1 are powers of p.
Let's denote:
xp−1+y=paandx+yp−1=pb
for some positive integers a and b.
### Case 1: p=2
In this scenario, the equations become:
x1+y=2aandx+y1=2b
This simplifies to:
x+y=2aandx+y=2b
For these equations to hold simultaneously, it must be the case that a=b, which means x+y=2k for some k.
Thus, for p=2, the solutions are given by:
(p,x,y)=(2,n,2k−n)where0<n<2k
### Case 2: p=3
For p=3, we have:
x2+y=3aandx+y2=3b
We shall try small values of x and check for integer y.
**Subcase x=2:**
- x2=4, so 4+y=3a.
- This implies y=3a−4.
x+y2=3b:
- 2+(3a−4)2=3b.
Checking possible small values for a:
- a=1 gives y=3−4=−1, which is not valid.
- a=2 gives y=9−4=5, and thus:
- x+y2=2+52=27=33. This works, leading to a solution (3,2,5).
**Subcase x=5:**
- x2=25, so 25+y=3a.
- This implies y=3a−25.
x+y2=3b:
- 5+(3a−25)2=3b.
Checking for valid values for a:
- a=3 gives y=27−25=2, and thus:
- x+y2=5+22=9=32. This works, leading to another solution (3,5,2).
There are no other small values of x yielding valid y as a power of 3 sum.
### Conclusion
Considering all cases, the complete set of solutions is:
(p,x,y)∈{(3,2,5),(3,5,2)}∪{(2,n,2k−n)∣0<n<2k}