$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
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.