I've to study injectivity and surjectivity of $f:\mathbb{Z}\to\mathbb{Z}$, with $f(n)=an^2+bn+c$, in function of $a,b,c\in\mathbb{Z}$.
How can I start?
Here's what I've tried, with injectivity:
From definition, given $n_1,n_2\in\mathbb{Z}$ I have to prove that $f(n_1)=f(n_2)\Rightarrow n_1=n_2$.
Then, $an_1^2+bn_1+c=an_2^2+bn_2+c$
$\Rightarrow a(n_1^2-n_2^2)+b(n_1-n_2)=0$
$\Rightarrow (n_1-n_2)(a(n_1+n_2)+b)=0$
I don't know how to continue.