Square of a number

Dec 2015
1,069
164
Earth
Find all values of \(\displaystyle n\) such that \(\displaystyle n^2 +64n +646 \; \) is a square of a natural number .
\(\displaystyle n\in \mathbb{N}\) .
 
Aug 2017
313
112
United Kingdom
If $n^2 + 64n + 646 = m^2$ with $n$ and $m$ natural, then $n = \dfrac{-64 \pm \sqrt{64^2 - 4 \times (646 - m^2)}}{2}$. So $64^2 - 4 \times (646 - m^2) = 4 \times (378 + m^2)$ is a square number. This implies $378 + m^2$ is itself a square, say $378 + m^2 = k^2$. But $378 \equiv 2 \bmod 4$, while the difference of two squares must be $0$, $1$ or $3$ $\bmod 4$. This is a contradiction. Hence there are no solutions.
 
  • Like
Reactions: 3 people
Dec 2015
1,069
164
Earth
Saw it in a old page , seems like it is wrong.
 

v8archie

Math Team
Dec 2013
7,710
2,679
Colombia
If $n^2 + 64n + 646 = m^2$ with $n$ and $m$ natural, then $n = \dfrac{-64 \pm \sqrt{64^2 - 4 \times (646 - m^2)}}{2}$. So $64^2 - 4 \times (646 - m^2) = 4 \times (378 + m^2)$ is a square number. This implies $378 + m^2$ is itself a square, say $378 + m^2 = k^2$.
Perhaps a tidier way of expressing this is by completing the square:
\begin{align}n^2 + 64n + 646 &= m^2 \\ n^2 + 64n + 1024 &= m^2 + 378 \\ (n+32)^2 &= m^2 + 378\end{align}
 
  • Like
Reactions: 4 people

SDK

Sep 2016
792
539
USA
It's worth pointing out that taking the original expression mod 4 gives the result immediately, since $n^2 + 64n + 646$ can only be $2$ or $3$ mod 4 while any square can only be $0$ or $1$ mod 4.

Of course, I noticed this after having the benefit of reading cjem's solution, so I doubt I would have initially solved it differently than cjem.
 
Last edited by a moderator:
  • Like
Reactions: 2 people

Denis

Math Team
Oct 2011
14,592
1,026
Ottawa Ontario, Canada
Find all values of \(\displaystyle n\) such that \(\displaystyle n^2 +64n +646 \; \) is a square of a natural number .
\(\displaystyle n\in \mathbb{N}\) .
n^2 + 64n + 646 = u^2 : NO solutions if u = natural number

If the 646 is changed to 640, then 3 solutions: n = 3, 18, 65
 
  • Like
Reactions: 2 people