# If $n$ is a perfect square, then $n+2$ is not. Valid proof by contradiction?

I understand this proposition has been proven many times across this forum, but my first attempt at a proof led me to a strategy that I haven't seen anywhere. I'm curious if it is a valid approach.

Let $$n = k^2, k \in \mathbb{Z}$$. Assume for contradiction that $$n+2 = j^2, j \in \mathbb{Z}$$.

$$n=k^2 \Rightarrow k^2 +2 = j^2 \Rightarrow \sqrt{k^2 + 2} = j$$

$$j \notin \mathbb{Z}$$, which contradicts assumption. Therefore, $$n+2$$ is not equal to a perfect square.

Did I go wrong anywhere here?

• why can you conclude that $j\not \in \mathbb{Z}$? Dec 18 '19 at 2:08
• how do we know it's not integer.
– user645636
Dec 18 '19 at 2:09

Well, you said nothing wrong, but your jumping from $$\sqrt{k^2 + 2} = j$$ to the notion that $$j$$ is not an integer...that's equivalent to the original problem. How do you know that the square root isn't an integer? Lots of square roots are, like $$\sqrt{64}$$ and $$\sqrt{16}$$, etc.
As others commented, how do you know with $$k\in\mathbb Z$$ that $$j=\sqrt{k^2+2}\not\in\mathbb Z$$?
We may assume without loss of generality that $$k\ge0$$.
For $$k\ge1$$, $$(k+1)^2=k^2+2k+1>k^2+2=j^2$$, so $$k, so $$j\not\in\mathbb Z$$.
For $$k=0, j=\sqrt{k^2+2}$$ is not an integer either.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 17, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}