# Square of a number

#### idontknow

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}$$ .

#### cjem

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.

3 people

#### idontknow

Saw it in a old page , seems like it is wrong.

#### v8archie

Math Team
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}

4 people

#### SDK

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:
2 people

#### Denis

Math Team
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

2 people
Similar threads