Veamos que [math]a\leq 6, el resto es simplemente hacer verificaciones y extraer las soluciones válidas.
Si fuera [math]a\geq 7 entonces [math]7\mid 4a!, luego [math]b^2=5\left (1+2^{3a}+4a!\right )\equiv 5\left (1+1^a+0\right )\equiv 3\pmod 7, absurdo pues [math]3 no es residuo cuadrático módulo [math]7.