Find solutions of $2^m\cdot p^2+1=q^5$ $2^m\cdot p^2+1=q^5$
$p$ and $q$ are prime numbers
find $p$ and $q$
I think it will be useful to transfer $1$ to the other side of the equation
$2^m\cdot p^2=(q-1)(q^4+q^3+q^2+q+1)$
 and we know $gcd(q-1,q^4+q^3+q^2+q+1)=1$ or $5$
we know if
I)$q-1|2^m \implies p^2|q^4+q^3+q^2+q+1$ or 
II)$2^m|q-1 \implies q^4+q^3+q^2+q+1|p^2$ 
if $gcd(q-1,q^4+q^3+q^2+q+1)=5 \implies$
I)$5|2^m \implies$ 
Inconsistency
II)$5|p^2 \implies p=5$ 
$\implies gcd(q-1,q^4+q^3+q^2+q+1)=1$
But I went to this part of the problem and more of this I could not continue
 A: You can write the equation as:
$$2^m\cdot p^2=q^5-1$$
From here you can note that the prime number $q>3$.
Noe you obtain:
$$2^m\cdot p^2=(q-1)(q^4+q^3+q^2+q+1)$$
therefore you can note that $q^4+q^3+q^2+q+1$ is odd; this yields $$2^m=q-1$$
and $$p^2=q^4+q^3+q^2+q+1$$
but $p^2=q^4+q^3+q^2+q+1$ has solutions only for $p=11$ and $q=3$.
Indeed we can write $$\left(q^2+\frac{q}{2}\right)^2={q^4+q^3}+\frac{q^2}{4}<{q^4+q^3}+q^2+q+1 \\ \frac{q^2}{4}<q^2+q+1 $$ and on the other hand $$ \left(q^2+\frac{q+2}{2}\right)^2=q^4+q^3+2q^2+\frac{q^2+4q+4}{4}>q^4+q^3+q^2+q+1 \\ {q^4+q^3}+\frac{9}{4}q^2{+q+1}>{q^4+q^3}+q^2{+q+1} \\ \frac{9}{4}q^2>q^2.$$ From here, $q$ cannot be even, and for some odd $q$ we must have $$\left(q^2+\frac{q+1}{2}\right)^2={q^4+q^3+q^2}+\frac{q^2+2q+1}{4}={q^4+q^3+q^2}+q+1 \\ q^2+2q+1=4q+4 \\ q^2-2q-3=(q-3)(q+1)=0,$$ from here $q=3$. In particular, $$3^4+3^3+3^2+3+1=11^2$$
therefore the only solutions are $p=11$, $q=3$ and $m=1$.
A: Let $f(q) = q^4+q^3+q^2+q+1$. Since $f(q)$ is odd, it must be equal to $p$ or to $p^2$. The first is not possible because it would imply that $q-1=2^mp$, i.e. $q>p$ which contradicts with $f(q)=p$.
Thus $f(q)=p^2$ and $q-1=2^m$. Since $q\equiv 1 \pmod{2^m}$, we get $p^2=f(q)\equiv 5 \pmod{2^m}$. This is possible only for $m \leq 2$ since all odd squares are $1 \pmod 8$.
Now $m=1$ gives $q=3$ and $p=11$, while $m=2$ giving $q=5$ does not yield a valid solution.
