<s>[INST] $9 \mid a^2 +b^2+ab$. Show that $3$ divides both $a$ and $b$. $a$ and $b$ are integers. 
$a^2 +b^2+ab$ is a multiple of $9$.
I have to prove that $3$ divides both $a$ and $b$. 
Converse is very easy. Put $a=3k$ and $b=3l$ and that's it. 
I was trying factorisation but didn't get anything from it. 
 [/INST] Assuming $a,b$ are distinct,
$9 \mid a^2 +b^2+ab$
$\Rightarrow  9\mid \{(a-b)^2+3ab\} \,\,\,\,\,\,\,\,\, - (1)$
$\Rightarrow  3\mid \{(a-b)^2+3ab\}$
$\Rightarrow  3\mid(a-b)^2$
$\Rightarrow  3\mid(a-b)$
$\Rightarrow  9\mid(a-b)^2  \,\,\,\,\,\,\,\,\, - (2)$
From $(1)$ and $(2)$, we can conclude that
$9\mid3ab \Rightarrow  3\mid ab$
</s>