Find all integers $n$ such that $(n – 1)^2 + 3$ divides $n^3 + 2023$.

algebra-precalculusdivisibilityelementary-number-theorypolynomials

Problem: Find all integers $n$ such that $(n – 1)^2 + 3$ divides $n^3 + 2023$.

My Work:

$(n – 1)^2 + 3 = n^2 – 2n + 4$, which is always greater than 0 for all integers n.

Therefore, if $n^2 – 2n + 4$ divides $n^3 + 2023$, then $n^3 + 2023 >= n^2 – 2n + 4$.
We can also introduce an integer k into this, but we get left with $n^3 + 2023 = k * (n^2 – 2n + 4)$.

After getting this inequality and equation, I am not really sure how to continue. I would really appreciate some help! Thank you so much!

Best Answer

As written above, $$ n^3+2023=(n^2-2n+4)(n+2)+2015 $$ so you need $$ 2015=((n-1)^2+3)k $$ for some integer $k$. Since $k$ must divide $2015$, we have $\pm k\in\{1, 5, 13, 31, 65, 155, 403, 2015\}$ (see the comments; you also formally probably need the negative ones). However, since $(n-1)^2+3>0$, we must have $k>0$, so $\frac{2015}k\in\{1, 5, 13, 31, 65, 155, 403, 2015\}$ $$ |n-1|\in \{\sqrt{1-3}, \sqrt{5-3}, \sqrt{13-3}, \sqrt{31-3}, \sqrt{65-3}, \sqrt{155-3}, \sqrt{403-3}, \sqrt{2015-3}\}=\{\sqrt{-2}, \sqrt{2}, \sqrt{10}, \sqrt{28} ,\sqrt{ 62} ,\sqrt{ 152} ,20 ,\sqrt{ 2012}\} $$ where only one is an integer (see the comments too) so since $n$ must be an integer we get $|n-1|=20$, i.e. $n=21$ or $n=-19$.