for what value of $a$ has equation rational roots? Suppose that we have following quadratic equation containing some constant $a$
 $$ax^2-(1-2a)x+a-2=0.$$
We  have to find  all integers $a$,for which this equation has rational roots.
First I have tried to determine for which $a$ this equation has a real solution, so I calculated the discriminant (also I guessed that $a$ must not be equal to zero, because in this situation it would be a linear form, namely $-x-2=0$ with the trivial solution $x=-2$).
So  $$D=(1-2a)^2-4a(a-2)$$  if we simplify,we get $$D=1-4a+4a^2-4a^2+8a=1+4a$$
So we have the roots: $x_1=(1-2a)-\frac{\sqrt{1+4a})}{2a}$ and $x_2=(1-2a)+\frac{\sqrt{1+4a})}{2a}$
Because we are interesting in rational numbers, it is clear that  $\sqrt{1+4a}$ must be a perfect square, because $a=0$ I think is not included in solution set,then what i have tried is use $a=2$,$a=6$,$a=12$,but are they the only solutions which I need or how can I find all values of $a$?

put $4a+1=m^2$ for some $m$, then $4a=(m+1)(m-1)$.Now, $m$ must be odd otherwise RHS won't be divisible by 4.Let $m=2k+1$,it gives $4a+1=4k^2+4k+1 \implies a=k(k+1)$. So Put $k=1,2,3,$ and so on, you will get the required values of $a$.
