Since the right-hand side is a product of prime factors, it would be convenient if the left-hand side were also a product. It should then be factorizable into a first-degree and a second-degree polynomial in x. Trying this gives the following factorization. We can factor the left-hand side as (x+2)(x2−2x+7). Therefore, it must hold that
(x+2)(x2−2x+7)=2pn.
First, assume that x is even. Then x+2=2pa for some integer a≥0 and x2−2x+7=pn−a. (Note that this also works if p=2.) Since x is a positive integer, x+2≥3, so we can exclude a=0. Furthermore, x2−3x+5>(x−23)2≥0 for all x, so x2−2x+7>x+2. This means that n−a>a. We now substitute x=2pa−2 into x2−2x+7=pn−a:
(2pa−2)2−2(2pa−2)+7=pn−a,
or equivalently,
4p2a−12pa+15=pn−a.
Since n−a>a, pa∣pn−a. Furthermore, pa∣pa and pa∣p2a. Therefore, pa must also be a divisor of 15. This implies p=3 or p=5 and further a=1. If p=3, the left side is 15 and the right side is 3n−1; this does not yield a solution. If p=5, the left side is 55 and the right side is 5n−1; this also does not yield a solution.
Now assume that x is odd. Then x+2=pa for some integer a≥0 and x2−2x+7=2pn−a. Since x is a positive integer, x+2≥3, so a=0 can be excluded again. Furthermore, x=2, so x2−4x+3=(x−2)2−1≥0, thus x2−2x+7≥2(x+2). Therefore, n−a≥a. We now substitute x=pa−2 into x2−2x+7=2pn−a:
(pa−2)2−2(pa−2)+7=2pn−a
or equivalently,
p2a−6pa+15=2pn−a.
Since n−a≥a, pa∣pn−a. Therefore, we find that pa∣15, which implies p=3 or p=5 and further a=1. If p=3, the left side is 6 and the right side is 2⋅3n−1, so n=2. We find x=3−2=1. Indeed, (1,2,3) is a solution. If p=5, the left side is 10 and the right side is 2⋅5n−1, so n=2. We find x=5−2=3. Indeed, (3,2,5) is a solution. Therefore, there are two solutions, namely (1,2,3) and (3,2,5).