$$\frac{2n+3}{n^2+n+1}$$
How many integers are there that make an expression an integer?
$-1,0,2$ It is seen that the numbers make the fraction integer immediately. But the answer key says there are three more $~n~$ values.
$$\frac{2n+3}{n^2+n+1}$$
How many integers are there that make an expression an integer?
$-1,0,2$ It is seen that the numbers make the fraction integer immediately. But the answer key says there are three more $~n~$ values.
The integer value of the ratio cannot be $0$. So we must have $|2n+3| \geq n^{2}+n+1$. Hence $n^{2} \leq 2|n|+3-n-1 \leq 3|n|+2$. Can you continue from here?
[For $n>0$ write the inequality as $(n-\frac 3 2)^{2} \leq \frac {17} 4$. This gives $n <\frac 3 2+\frac 5 2$ so $n <4$. So the only possibilites for $n >0$ are $n=1,2,3$. See if the ratio is an integer for these values].
Hint $ $ By Euclid/Bezout $\ d = n^2\!+\!n\!+\!1\,\Rightarrow\! \overbrace{(1\!-\!2n)}^{\textstyle\ \ \color{#0a0}{3+2\bar n},\,\ \rlap{\bar n = -1\!-\!n}}\!(3\!+\!2n) + 4 d = \color{#c00}7\ $ so $\, d\mid 3\!+\!2n\,\Rightarrow\, d\mid 7$
Remark $ $ The Bezout equation is essentially $\ (\color{#0a0}{2\!-\!\sqrt{-3}})(2\!+\!\sqrt{-3})\,=\, \color{#c00}7,\,$ an Eisenstein norm.
For more examples of multiplying by a $\rm\color{#0a0}{'conjugate'}$ to get a $\rm\,\color{#c00}{simpler}\,$ multiple, see here & here.
Below is a general view of such "conjugation", along with a view by polynomial evaluation at a "formal fraction" $\,\color{#90f}{n\equiv d/e},\,$ which needn't exist - it is used to concisely denote $\,e^2 f\left(\tfrac{d}e\right)$.
$\left.\begin{align}{\bf Theorem} \ \ \ \ \ \ {\rm If}\ \ \ m\, =\ & n^2\!+b\ n\, +\, c \ =:\ f(n) \\[.2em] {\rm then}\ \ m\mid \color{#90f}{d\!-\!en}\,\Rightarrow\, m\,\mid \, & d^2\!+b\,de + c\,e^2\! = e^2 f\left(\tfrac{d}e\right)\end{align}\!\right\} $ i.e. $\! \begin{align} f(n)\equiv 0\\ \color{#90f}{n\equiv \tfrac{d}e}\end{align}\Rightarrow\, e^2f\left(\tfrac{d}e\right)\equiv 0\pmod{\!m}$
Proof $\,$ A Vieta "conjugate" $\,\bar n\,$ with $\,\color{#0a0}{n+\bar n = -b}\,$ has $\,\color{#c00}{n\bar n} = -n^2-bn\equiv \color{#c00}c\pmod{\!m},\,$ so
$\!\bmod m\!:\ \ 0\equiv (d\!-\!en)(d\!-\!e\bar n) = d^2\,\underbrace{-(\color{#0a0}{n\!+\!\bar n}}_{\Large\color{#0a0}{b}})de + \underbrace{\color{#c00}{n\bar n}}_{\Large\color{#c00}c} e^2 $
A simple prototypical application of the Theorem is in this answer.
If $\dfrac{2n+3}{n^2+n+1}$ is an integer, then it is $0$ or $\ge1$ or $\le-1$.
But $\dfrac{2n+3}{n^2+n+1}=0$ would mean $n=\dfrac{-3}2,$ not an integer.
And $n^2+n+1>0$ for all $n$,
so $\dfrac{2n+3}{n^2+n+1}\le-1\implies 2n+3\le-1(n^2+n+1)\implies n^2+3n+4\le0$,
which is true for no real $n$.
Therefore, $\dfrac{2n+3}{n^2+n+1}\ge1,$ which means $2n+3\ge n^2+n+1$
or $n^2-n-2=(n+1)(n-2)\le0$, which means $-1\le n\le 2$.
Of the integers between $-1$ and $2$, $\dfrac{2n+3}{n^2+n+1}$ is an integer for $n=-1$, $0$, and $2$ but not $1$.
Let $\frac{2n+3}{n^2+n+1}=k\in\mathbb Z$.
Thus, $$kn^2+(k-2)n+k-3=0$$ and since $k=0$ is impossible, we need $$(k-2)^2-4k(k-3)\geq0$$ or $$3k^2-8k-4\leq0$$ or $$\frac{4-\sqrt{28}}{3}\leq k\leq \frac{4+\sqrt{28}}{3},$$ which gives $$1\leq k\leq3.$$ Id est, it's enough to consider three cases: $$k\in\{1,2,3\}.$$