  In this paper, using a deep result on the existence of primitive divisors of
Lehmer numbers due to Y. Bilu, G. Hanrot and P. M. Voutier, firstly, we give an
explicit formula for all positive integer solutions of the Diophantine equation
$(x-d)^2+x^2+(x+d)^2=y^n$ (*) when $n$ odd prime and $d=p^r$, $p>3$ a prime.
Secondly, under assumption of this result, we prove that (*) has at most one
solution $(x,y)$. Thirdly, we show that if every odd prime divisor $p$ of $d$
satisfies $p\not\equiv \pm 1 \pmod{2n},$ then (*) has only the solution
$(x,y,d,n)=(21,11,2,3)$. Finally, using Baker's method, we prove that if
$n>228000$ and $d>8\sqrt{2}$, then all solutions $(x,y)$ of (*) satisfy
$y^n<2^{3/2}d^3$. This paper is an extension of the papers of V. Patel and A.
Koutsianas \cite{KP} and A. Koutsianas \cite{Kou}.
