9

I successfully thought of bounding our expression examining consecutive squares that attain values close to it, and this led to the solution I'll post as an answer, which was the one reported. However, before that, I had briefly tried manipulating $$n^4+n^3+n^2+n+1=m^2.$$Since $n=1$ is not a solution, I rewrote this as $$\frac{n^5-1}{n-1}=m^2 \\ n^5-1=nm^2-m^2 \\ m^2-1=n(m^2-n^4) \\ (m-1)(m+1)=n(m-n^2)(m+n^2),$$ but in vain. Does manipulation lead somewhere? Is there a different approach from both of mine?

Bill Dubuque
  • 282,220
  • @ByronSchmuland: Thank you for your comment and your answer. However none of those answers provides an alternative approach with the degree of the polynomial being $4$ and the value of $x$ varying. – Vincenzo Oliva Nov 24 '15 at 19:38
  • As a reference: this exercise was proposed in the admission test of SNS (Scuola Normale Superiore, Italy), 2015 (If I recall it correctly). – Jack D'Aurizio Jan 28 '17 at 17:35

3 Answers3

13

Hint: notice that $$ (2n^2+n)^2 = 4n^4+4n^3+n^2, $$ $$ (2n^2+n+1)^2 = 4n^4+4n^3+5n^2+2n+1 $$ are two consecutive squares and $4(n^4+n^3+n^2+n+1)$ is just between them, with very few exceptions. An old motto says "too close to a square to be a square, it is not a square".

Jack D'Aurizio
  • 361,689
10

For all positive $n$ we have $$\require\cancel \left(n^2+\frac{n}{2}\right)^2=\cancel{n^4+n^3}+\frac{n^2}{4}<\cancel{n^4+n^3}+n^2+n+1 \\ \frac{n^2}{4}<n^2+n+1 $$ and on the other hand $$\require\cancel \left(n^2+\frac{n+2}{2}\right)^2=n^4+n^3+2n^2+\frac{n^2+4n+4}{4}>n^4+n^3+n^2+n+1 \\ \cancel{n^4+n^3}+\frac{9}{4}n^2\cancel{+n+1}>\cancel{n^4+n^3}+n^2\cancel{+n+1} \\ \frac{9}{4}n^2>n^2.$$ As a consequence, $n$ cannot be even, and for some odd $n$ we must have $$\left(n^2+\frac{n+1}{2}\right)^2=\cancel{n^4+n^3+n^2}+\frac{n^2+2n+1}{4}=\cancel{n^4+n^3+n^2}+n+1 \\ n^2+2n+1=4n+4 \\ n^2-2n-3=(n-3)(n+1)=0,$$ whence $n=3$. In particular, $$3^4+3^3+3^2+3+1=11^2.$$

  • I used a similar techniques here: http://math.stackexchange.com/questions/493162/show-that-xx1-y4y3ay2byc-has-a-finite-number-of-positive-integral to show that if $a$, $b$, and $c$ are integers, there are only a finite number of positive integers $x$ and $y$ such that $x(x+1) = y^4+y^3+ay^2+by+c$. – marty cohen May 06 '15 at 23:51
  • @martycohen Nice, (+1). Sooner or later I'll try to deal with your problem. – Vincenzo Oliva May 07 '15 at 06:58
2

There are only two additional non-positives that also give perfect squares.


Case 1: $\boldsymbol{n}$ odd $$ \begin{align} \left(n^2+\frac{n-1}2\right)^2 &=n^4+n^2(n-1)+\frac{n^2-2n+1}4\\ &=n^4+n^3-\frac34n^2-\frac12n+\frac14 \end{align} $$ smaller than $n^4+n^3+n^2+n+1$ if $\frac74n^2+\frac32n+\frac34\gt0$ $$ \begin{align} \left(n^2+\frac{n+1}2\right)^2 &=n^4+n^2(n+1)+\frac{n^2+2n+1}4\\ &=n^4+n^3+\frac54n^2+\frac12n+\frac14 \end{align} $$ bigger than $n^4+n^3+n^2+n+1$ if $\frac14n^2-\frac12n-\frac34\gt0$.

Only leaves $n=-1,1,3$. Only $-1,3$ give squares.


Case 2: $\boldsymbol{n}$ even $$ \begin{align} \left(n^2+\frac{n}2\right)^2 &=n^4+n^2n+\frac{n^2}4\\ &=n^4+n^3+\frac14n^2 \end{align} $$ smaller than $n^4+n^3+n^2+n+1$ if $\frac34n^2+n+1\gt0$ $$ \begin{align} \left(n^2+\frac{n+2}2\right)^2 &=n^4+n^2(n+2)+\frac{(n+2)^2}4\\ &=n^4+n^3+\frac94n^2+n+1 \end{align} $$ bigger than $n^4+n^3+n^2+n+1$ if $\frac54n^2\gt0$.

Only leaves $n=0$, which gives a square.


Thus, only $n\in\{-1,0,3\}$ give squares.

robjohn
  • 353,833