# When is $n^2 - 8056$ a perfect square? [closed]

When is $$n^2 - 8056$$ a perfect square ? What is a generalized solution for $$n^2 - c$$ ?

• What have you tried? Aug 20, 2019 at 17:37

Hint: $$n^2 - 8056 = m^2$$ iff $$(n-m)(n+m)= 8056$$. This equation has integer solutions iff $$8056$$ can be decomposed into two factors of the same parity.
This argument holds in general: an integer is a difference of two squares iff it is odd or a multiple of $$4$$.
• Nice. And this gives explicit solutions for $n$ too (after factoring of course). Write $m$ here $m=8056 = xy$; $x$ and $y$ positive integers both $x$ and $y$ even ($m$ a multiple of 4) or both $x$ and $y$ odd $(m$ odd). Then $n=\frac{x+y}{2}$.