(i) How can I find all positive integers $m$ such that $m\equiv 4 \pmod 7$ and $m^3-m^2+1$ is a perfect square?
(ii) Is there a method to solve this equation over positive integers: $$m^3-m^2+1 = n^2.$$
(i) How can I find all positive integers $m$ such that $m\equiv 4 \pmod 7$ and $m^3-m^2+1$ is a perfect square?
(ii) Is there a method to solve this equation over positive integers: $$m^3-m^2+1 = n^2.$$
Solution to i). We put $m=7\lambda+4$, for an integer $\lambda\geq 0$ in your equation. We obtain, thus by substitution $$343\lambda^3+539\lambda^2+280\lambda+49=n^2.$$ Since $7|n^2$ then $49|n^2$, thus since $49$ doesn't divide $280$ there exists an integer $\mu\geq 0$ such that $\lambda=7\mu$, and we obtain $$2401\mu^3+539\mu^2+40\mu+1=l^2,$$ for $l^2=(\frac{n}{7})^2$.
If $\mu=0$ we obtain the solution $(m,n)=(4,7)$, corresponding to $l=1$.
Now let $\mu>0$, since if $\mu$ is even (or odd, too holds the following statement) $2|2401\mu^3+539\mu^2+40\mu$ then $2$ divides $1-l^2$, thus $\mu-2|2401\mu^3+539\mu^2+40\mu+1-l^2$. When we divide we obtain $$2401\mu^3+539\mu^2+40\mu+1-l^2=(\mu-2)\cdot (2401\mu^2+5341\mu+10722),$$ with remainder $21444+1-l^2$ vanishing, that has not integer solutions. Neither the quotient equation $2401\mu^2+5341\mu+10722=0$ (compute its discriminant to prove). Thus the unique solution is computed as $(m,n)=(4,7)$.
I hope that there aren't mistakes in my computations. Another attempt to solution that I made was study your equation as $$m^2(m-1)=(n-1)(n+1).$$
My solution to ii). We study the case $n=1$ and obtain the solutions $(m,n)=(0,1),(1,1)$. Thus we assume that integers $m,n\geq 1$. And we use previous method for study (and we are sure too to exclude more solutions) in cases $m\equiv 0,1,2,3,5,6\mod 7$. For case $m=7k$ for an integer $k$, we obtain by substitution $(7k)^3-(7k)^2+1-n^2=0$, with remainder (when we divide by $k-2$) $2548+1-n^2=0$ without integer solutions and negative discriminant of polynomial in quotient $343k^2+637k+1274$. My computations (corresponding to polynomial after our substitution, remainder without integer solutions, polynomial in quotient that has negative discriminant) to cases $m\equiv 1,2,3,5,6\mod 7$ are
$343k^3+98k^2+7k+(1-n^2)=0$, $3150+1-n^2=0$ and $343k^2+784k+1575$;
$343k^3+245k^2+56k+4+(1-n^2)=0$, $3840+1-n^2=0$ and $343k^2+931k+1918$;
$343k^3+392k^2+147k+(1-n^2)=0$, $4606+1-n^2=0$ and $343k^2+1078k+2303$;
$343k^3+686k^2+455k+100+(1-n^2)=0$, $6498+1-n^2=0$ and $343k^2+1372k+3199$;
$343k^3+833k^2+672k+180+(1-n^2)=0$, $7600+1-n^2=0$ and $343k^2+1519k+3710$.
(I've edited because my computations were wrong and to give a full solution. Thanks.)