<s>[INST] If the roots of the equation are integers then find the value of $k$. The question says roots of $x^2-kx+36=0$ are integers then the number of values for $k$ are?
I know roots are integral if discriminant is a perfect square of an integer, but using this I get infinite values for $k$.  Which values should I reject?
 [/INST] HINT:
Let $k^2-4\cdot1\cdot36=y^2\iff(k+y)(k-y)=144$
As $k+y\pm(k-y)$ are even, $k-y,k+y$ have the same parity, hence both must be even
$$\dfrac{k+y}2\cdot\dfrac{k-y}2=\dfrac{144}4=?$$
What are the positive divisors of $36?$
Also as $k+y\ge k-y,36=\dfrac{k+y}2\cdot\dfrac{k-y}2\le\dfrac{(k+y)^2}4$
$\implies k+y\ge\sqrt{4\cdot36}$ as $k+y>0$
$\implies\dfrac{k+y}2\ge6$ and must divide $36$
</s>