Suppose $f(x)=ax+b$ is our polynomial over $\mathbb{R[x]}$ such that for all $x\in \mathbb{Z}$ either $2|f(x)$ or $3|f(x)$. Show that either for all $x\in \mathbb{Z}$, $2|f(x)$ or for all $x\in\mathbb{Z}$, $3|f(x)$.
I have tried to assume $f(0)=b$ is divisible by $3$ and hope to show for all $x\in\mathbb{Z}$, $3|f(x)$. However, I am really stuck and not sure on how to proceed.
Looking at $x=0$ to get $f(0) = b$ is a great idea. Suppose $2\mid f(0) = b$ than $3\not\mid f(0) = b$, with other words $b = 2n$ where $3\not\mid n\in\mathbb{Z}$. Thus $f(x) = ax + 2n$ is not divisible by $3$ because $2n$ is not (we cannot factor out a $3$). This means for all $x\in\mathbb{Z}$ we have $2\mid f(x)$.
The same argument holds if $3\mid b$ and $2\not\mid b$.