Find all positive integers $n$ such that $n^4 - n^3 + 3n^2 + 5$ is a perfect square.
Problem
Source: New Zealand MO 2019 Round 1 p5
Tags: number theory, Perfect Square
17.06.2023 05:26
parmenides51 wrote: Find all positive integers $n$ such that $n^4 - n^3 + 3n^2 + 5$ is a perfect square. We will delimit between 2 consecutive squares. $\color{blue}\boxed{\textbf{If n is even:}}$ $\color{blue}\rule{25cm}{0.3pt}$ $$\Rightarrow n=2k$$$$(n^2-k+1)^2=n^4-n^3+\frac{5n^2}{4}-n+1$$$$\text{We want to try } n^4-n^3+\frac{9n^2}{4}-n+1<n^4-n^3+3n^2+5$$$$\Leftrightarrow 0<\frac{7n^2}{4}+n+4 \text{ (TRUE)}$$$$(n^2-k+2)^2=n^4-n^3+\frac{17n^2}{4}-2n+4$$$$\text{We want to try }n^4-n^3+\frac{17n^2}{4}-2n+1>n^4-n^3+3n^2+5$$$$\Leftrightarrow \frac{5n^2}{4}-2n-4>0$$$$\Leftrightarrow n\ge 3$$$$\Rightarrow n=2$$$$\Rightarrow 2^4-2^3+3\times 2^2+5=25 \text{ is a perfect square (TRUE)}$$$$\Rightarrow \boxed{n=2 \text{ is a solution}}$$$\color{blue}\rule{25cm}{0.3pt}$ $\color{blue}\boxed{\textbf{n is odd:}}$ $\color{blue}\rule{25cm}{0.3pt}$ $$\Rightarrow n=2k+1$$$$\text{We want to try } (n^2-k)^2<n^4-n^3+3n^2+5$$$$\Leftrightarrow 0<\frac{3n^2}{2}+n+\frac{9}{2} \text{ (TRUE)}$$$$\text{We want to try } (n^2-k+1)^2>n^4-n^3+3n^2+5$$$$\Leftrightarrow 5n^2-6n-11>0$$$$\Leftrightarrow n\ge 3$$$$\Rightarrow n=1$$$$\Rightarrow 1^4-1^3+3\times 1^2+5=8 \text{ is a perfect square (FALSE)}$$$$\Rightarrow \boxed{\text{n odd has no solutions}}$$$\color{blue}\rule{25cm}{0.3pt}$ $\color{green}\boxed{\textbf{Conclusion:}}$ $\color{green}\rule{25cm}{0.3pt}$ $$\Rightarrow \boxed{\textbf{n=2 is the only solution}}_\blacksquare$$$\color{green}\rule{25cm}{0.3pt}$
11.12.2024 19:55
For $n\ge4$, notice that $n^4<n^4-n^3+3n^2+5< (n^2+1)^2$. Hence $n\le 3$. Checking these three cases we see that $n=2$ is the only solution.