1

Assume towards a contradiction that $n+2$ is a perfect square.

If $n=4=2*2$ then $n+2 = 6$ is a perfect square. Contradiction! QED.

Is this a valid proof? Can I show a contradiction by finding only one example?

Jason
  • 3,563
  • $6$ is not a perfect square, so that is not a contradiction. – N. S. Sep 19 '16 at 02:05
  • 1
    Your single example is a disproof of a different item, "If $n$ is a perfect square so is $n+2$." If your title is the actual question, you must come up with something that applies to $n=1,4,9,16,25,...$ – Will Jagy Sep 19 '16 at 02:08

4 Answers4

3

No, you cannot: you must show that $n+2$ is never a perfect square when $n$ is. One counterexample just tells you that $n=4$ doesn’t happen to work; it doesn’t tell you anything about $n=9$, or $n=16$, or any other perfect square.

HINT: Suppose that $n=a^2$ and $n+2=b^2$. Then

$$2=(n+2)-n=b^2-a^2=(b-a)(b+a)\;.$$

Why is this impossible if $a$ and $b$ are integers?

Brian M. Scott
  • 616,228
  • Right, but in my proof by contradiction I assume that n is a perfect square and that n+2 is a perfect square. So the reason I cannot use my one counter example in my contradiction is because n+2=6 is not a perfect square? Also, to answer your question its because 2 = 0 is false. – Jason Sep 19 '16 at 02:23
  • 1
    @Jason: You don't have counterexample. The theorem says that a certain thing never happens: $n$ and $n+2$ are never both perfect squares. You showed one $n$ for which it doesn't happen; that (a) says nothing about anything other $n$, and (b) is a confirming instance, not a counterexample. \ No, it's impossible because if $(b-a)(b+a)=2$, where $a$ and $b$ are positive integers, then $b-a=1$ and $b+a=2$. (Why?) But if you solve for $a$ and $b$, you'll find that this system has no integer solution, so no such $a$ and $b$ exist. – Brian M. Scott Sep 19 '16 at 02:35
  • 1
    Also, a proof by contradiction would go very differently. You'd assume that there is at least one $n$ such that $n$ and $n+2$ are both perfect squares and somehow derive a contradiction from that. Exhibiting one $n$ that doesn't work isn't a contradiction, because your assumption wasn't that $n+2$ is always a square when $n$ is: it's merely that there is at least one $n$ such that both $n$ and $n+2$ are squares. Maybe there's only one like that, and it has $10^{100}!$ digits, so that you couldn't possibly find it by experiment. – Brian M. Scott Sep 19 '16 at 02:42
1

Hint Assume by contradiction that $n$ and $n+2$ are perfect squares.

Then $$n=a^2 \,;\, n+2=b^2 \Rightarrow 2=b^2-a^2=(b-a)(b+a)$$

Can you get a contradiction from here?

N. S.
  • 132,525
1

$1^2$ and $2^2$ are separated by 3. Now consider $n^2$ and $(n+1)^2=n^2+2n+1$, for $n>1$. Now the difference is at least $2n+1=5$. So there cannot be two squares with 2 as difference.

0

There are many ways to prove this. Here's another:

If N is a perfect square, then it must be equal to 0, 1 or 4 Mod 8 (because those are the only quadratic residues mod 8). Thus N+2 would be equal to 2, 3, or 6 mod 8, and therefore cannot be a perfect square.