Let $\mathbb {Z}$, $ \mathbb {N}$ be the sets of all integers and positive integers, respectively. Let $p$ be a fixed odd prime. Recently, there have been many papers concerned with solutions $(x, y, n, a, b)$ of the equation $ x^2+2^ap^b=y^n$, $x, y, n\in \mathbb {N}$, $\gcd (x, y)=1$, $n\geq 3$, $a, b\in \mathbb {Z}$, $a\geq 0$, $b\geq 0. $ And all solutions of it have been determined for the cases $p=3$, $p=5$, $p=11$ and $p=13$. In this paper, we mainly concentrate on the case $p=3$, and using certain recent results on exponential diophantine equations including the famous Catalan equation, all solutions $(x, y, n, a, b)$ of the equation $x^2+2^a\cdot 17^b=y^n$, $x, y, n\in \mathbb {N}$, $\gcd (x, y)=1$, $n\geq 3$, $a, b\in \mathbb {Z}$, $ a\geq 0$, $ b\geq 0$, are determined.