Modular calculus and square I want to prove that $4m^2+1$ and $4m^2+5m+4$ are coprimes and also $4m^2+1$ and $4k^2+1$ when $k\neq{m}$ and $4m^2+5m+4$ and $4k^2+5k+4$ when $k\neq{m}$. Firstly : Let $d|4m^2+1$ and $d|4m^2+5m+4$ then $d|4m^2+5m+4-(4m^2+1)=5m+3$ and $d|5m^2+3m$ thus $d|5m^2+3m-(4m^2+5m+4)=m^2-2m-4$ and $d|4m^2-8m-16$ or $d|4m^2+5m+4-(4m^2-8m-16)=13m+20$ but $d|15m+9$ thus $d|15m+9-(13m+20)=2m-11$ but $d|13m+20-(5m+3)=8m+17$ and $d|8m-88$ therefore $d|8m+17-(8m-88)=105=5.3.7$. So $4m^2+1=105k$ or $4m^2=104+105k'$ but $k'=4k''$ then $m^2=26+105k''$ or $4m^2+1=21k$ or $4m^2+1=35k$ or $4m^2+1=15k$ or $4m^2+1=5k$ or 3k or 7k. Are there solutions to these equations, please, or can I conclude that the two numbers are coprimes ?
 A: You have an error in your calculation.
$8m-88$ should be $4(2m-11)=8m-44$. Then, $(8m+17)-(8m-44)=61$.
The two numbers are not always coprime. For example, for $m=36$, 
$$4m^2+1=5185=85\cdot 61,\ \ 4m^2+5m+4=5368=88\cdot 61.$$
In general, for $m=61k-25$ where $k$ is a positive integer, the two numbers have $61$ as a common prime factor :
$$4m^2+1=61(244k^2-200k+41),\ \ \ 4m^2+5m+4=61(244k^2-195k+39).$$
Also, for $m\gt 0,k\gt 0,m\not=k$, since
$$4m^2+1=4k^2=1\iff 4(m-k)(m+k)=0,$$
we have $4m^2+1\not =4k^2+1$.
For $m\gt 0,k\gt 0,m\not=k$, since
$$4m^2+5m+4=4k^2+5k+4\iff (m-k)(4m+4k+5)=0,$$
we have $4m^2+5m+4\not=4k^2+5k+4$.
A: You've already found $d$ divides $5m+3$
Again, $d$ divides $4m(5m+3)-5(4m^2+1)=12m-5$
$\implies d$ divides $12(5m+3)-5(12m-5)=61$
Now, $4m^2+1\equiv0\pmod{61}\iff m\equiv\pm36\pmod{61}$
A: you could also follow this method  :-
let  $4m^2+1 $ and $4m^2+5m+4 $ are coprimes then $GCD(4m^2+1,4m^2+5m+4)=1$
which means there exist x,y such that ${\color{Magenta} x}(4m^2+1)+{\color{Magenta} y }(4m^2+5m+4)={\color{Red} 1}$ , so lets try to find x,y that might makes it true.
by division algorithm(assume $m=2s$ or $2s+1$ ) , $4m^2+1$ could be of the form $16n+1$ or $8n+1$ then $16n+1\times 8n+1$ gives the form of ${\color{Red} {24k+1}}$ and $4m^2+5m+4$ could be of the form $2n$ or $4n+1$ then $2n \times 4n+1$ gives the form of ${\color{Green} {2k}}$
now we need to check if :-
$GCD({\color{Red} {24k+1} }, {\color{Green} {2k}})=1$
so we need x,y such that ${\color{Magenta} x}({\color{Red} {24k+1} })+{\color{Magenta} y} {\color{Green} {2k}}=1$
let x=1 and y=-12 then
${\color{Magenta} 1}({\color{Red} {24k+1} })+{\color{Magenta} {-12}} {\color{Green} {(2k)}}=24k+1-24k=1$
