Does $8a+5$ ever divide $b^2+8$?

No. $8a+5$ has a prime divisor $p$ congruent to 5 or 7 modulo 8 (since an odd natural number having only prime divisors congruent to 1 or 3 modulo 8 is itself congruent to 1 or 3). Next, -2 is quadratic non-residue modulo $p$, thus $(b/2)^2+2$ is not divisible by $p$.


Using the fact that $\mathbb{Z}[\sqrt{-2}]$ has unique factorisation, we can write:

$$ 8a + 5 \; \; | \; \; (b + 2 \sqrt{-2})(b - 2 \sqrt{-2}) $$

Now, the $\gcd$ of $b \pm 2 \sqrt{-2}$ divides $4\sqrt{-2}$. On the other hand, $8a + 5$ is not divisible by $\sqrt{-2}$, so any prime divisor of $8a + 5$ cannot divide both $b \pm 2 \sqrt{-2}$.

Consequently, $8a + 5$ has no real prime divisors, so we can write:

$$ 8a + 5 = b^2 + 2c^2 $$

Working modulo $8$, this is an immediate contradiction.


For the equation.

$$b^2+8=(8a+5)c$$

You can write for example the following parameterization.

$$b=12p^2+5p+11$$

$$a=-(6p^2+p+6)$$

$$c=-(3p^2+2p+3)$$

$a,c - $ turn out negative.

Will make a replacement. We introduce the number. $k=\frac{t^2+8}{3}$

We will use the solutions of Pell's equation. $p^2-8s^2=1$

Knowing the first solution i $(p_0;s_0) - (3;1)$, you can find the rest on the previous formula.

$$p_2=3p_1+8s_1$$

$$s_2=p_1+3s_1$$

Now knowing this, you can write down the solutions themselves.

$$b=tp^2+(8k+3)ps+8ts^2$$

$$a=-(p^2+2tps+(8k-5)s^2)$$

$$c=-(kp^2+2tps+3s^2)$$

$t,p,s - $ can have any sign.