# Solving diophantine equations: Finding integer solutions

So I've a question in my maths homework which I can't solve:

Find the integer solutions to:

$4x^2 + 5y = 1$

$(x,y) =\begin{cases}(5k+ 2,−(20k^2 + 16k + 3))\\(5k+ 3,−(20k^2 + 24k + 7))\end{cases}$

I've tried a couple of things but I don't think any of them are right, so any help? Thanks!

• Consider $x$ modulo $5$. – Donald Splutterwit Apr 27 '18 at 20:00
• What I would do is let $z= x^2$ so the equation becomes the linear Diophantine equation $4z+ 5y= 1$. The general solution is y= 1- 5k, z= -1+ 4k for k any integer. Now, go through and determine those values of k for which z is a prefect square. – user247327 Apr 27 '18 at 20:12

Since $5y\equiv 0 \bmod 5$, you have $4x^2\equiv 1 \bmod 5$. Then $4^{-1}=4\bmod 5$ and so $x^2\equiv 4 \bmod 5$
Then $x\equiv \pm 2 \in \{2,3\}\bmod 5$, which can be expressed per your answer as $x = \{5k+2,5k+3\}$ and $y$ can be calculated correspondingly from the original expression.
$$4x^2+5y=1\iff5y=(1-2x)(1+2x)$$
$$5\mid ab\iff 5\mid a\,\,\lor\,\,5\mid b$$