From the problem, we have
(x−y)[(x−y)2+3xy]=z2.
Since y is a prime number, and y∤z,3∤z, combining with equation (1), we know
(x,y)=1,(x−y,3)=1. Then (x2+xy+y2,x−y)=(3xy,x−y)=1.
From equations (1) and (2), we get
x−y=m2,x2+xy+y2=n2,z=mn.
(m,n∈N+)
Thus, 3y2=4n2−(2x+y)2
=(2n+2x+y)(2n−2x−y).
Since y is a prime number, and 2n−2x−y<2n+2x+y, there are the following three cases.
(1) 2n−2x−y=y,2n+2x+y=3y, which gives x=0, discard.
(2) 2n−2x−y=3,2n+2x+y=y2, then
y2−3=4x+2y=4(m2+y)+2y=4m2+6y,
which simplifies to (y−3)2−4m2=12.
Solving this, we get y=7,m=1.
Therefore, x=8,y=7,z=13.
(3) 2n−2x−y=1,2n+2x+y=3y2, then
3y2−1=4x+2y=4(m2+y)+2y=2(2m2+3y),
which simplifies to 3y2−6y−3m2=m2+1.
Thus, m2+1=0(mod3), which contradicts m2≡0,1(mod3).
In summary, the positive integer solution that satisfies the conditions is unique, which is (8,7,13).