19

"Prove that if n is a perfect square, $\,n+2\,$ is NOT a perfect square." I'm having trouble picking a method to prove this. Would contraposition be a good option (or even work for that matter)? If not, how about contradiction?

Kaveh
  • 3,572
Greg
  • 191
  • 2
    The first question is not "What method shall I use?" but "What's happening here?". So fool around with numbers. Anyway, contraposition is probably hard on the back. – André Nicolas Sep 23 '12 at 19:54
  • @AndréNicolas I disagree re. contraposition. To get from a square to the next smallest square, you have to subtract an odd number ... – Neal Sep 23 '12 at 19:56
  • @Neal: Ultimately we will use, at least implicitly, some logical apparatus. A little experimentation will show that the next square is always too much bigger, or some parity condition is violated. Once it is clear that this seems to be the case, one can worry about proving it. But the insight about what might be going wrong comes first. Does the Math Department have a new building? It has been forever since I was at IU. – André Nicolas Sep 23 '12 at 20:01
  • @AndréNicolas I'm sorry, I should have been clearer. I wholeheartedly agree that insight should come first. I just meant that some insights would suggest logical contraposition. Anyway, the Math Dept. is still in Rawles, the grad students are still infesting Swain East, but the Atwater house got a makeover last year. Who did you work with at IU? – Neal Sep 23 '12 at 20:21
  • 1
    I was an Assistant Professor there. And we were in Swain. Some fond memories. – André Nicolas Sep 23 '12 at 20:43

9 Answers9

46

Hint: Every perfect square is either $0$ or $1$ modulo $4$.

pritam
  • 10,157
14

Suppose $n=m^2$ and $n+2=k^2$. Clearly $k>m$, so $k\ge m+1$. But then $$n+2\ge (m+1)^2=m^2+2m+1\ge m^2+3=n+3$$ a contradiction.

Alex Becker
  • 60,569
11

$$n=a^2\,\,,\,\,n+2=b^2\Longrightarrow 2=(n+2)-n=b^2-a^2=(b-a)(b+a)$$

Now check that this is impossible (and $\,b>0\,$ )

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
9

Hint $\rm\ f(n) = n^2\:$ is increasing on $\Bbb N$ so the difference between two different values is at least the difference between two consecutive values, which is $\rm\:(n\!+\!1)^2 - n^2\:\! =\, 2n\!+\!1 > 2\:$ for $\rm\:n > 0.$

Remark $\ $ This has a natural presentation by telescopy, e.g.

$$\rm f(4)\!-\!f(1)\ =\ f(4)\!-\!f(3)\ +\ f(3)\!-\!f(2)\ +\ f(2)\!-\!f(1) $$

and since each RHS difference is $> 2,\,$ so too is the LHS.

Bill Dubuque
  • 272,048
4

You don't even need algebra to do this – think squared paper. The only thing to specify about a square is its side length, so if you want to show a bigger square is a perfect square, the only thing you can do is increase the side length. But if you increase the side length by 1, you need to add at least 1 square to each side, and 1 on the corner, so you need to add at least three squares.

This is aside from the case where $n = 0$. But $2$ isn't a perfect square, so that's fine.

Ben Millwood
  • 14,211
3

I don't know that you should pick a proof strategy before you have played with the hypotheses a little bit. In my experience, thinking about the hypotheses tends to suggest natural proof strategies.

In this case, I would think like this: perfect squares are the partial sums of the series of positive odd numbers, so you can't get to the next perfect square by adding $2$. This suggests contradiction.

Alternatively -- and this would suggest proof by contraposition -- if you have arranged $n$ tiles in a square, and you remove two, can you rearrange those into a smaller square?

Neal
  • 32,659
3

More generally, for every positive integer $m$, there are only a finite number of positive integers $n$ such that $n^2+m$ is a perfect square.

Proof: Suppose $n^2+m = (n+k)^2$. Then $m = 2nk + k^2 > 2nk \ge 2n$, so $n < m/2$.

If $m = 2$, then $n < 1$, so there are no solutions.

To find all solutions for a particular large $m$, congruences can greatly reduce the number of cases that have to be tested.

This readily generalizes to any function that increases at least linearly: If $f(n+1)\ge f(n)+cn$ for some positive $c$, then, for any positive $m$, there are only a finite number of $n$ such that $f(n)+m = f(k)$ for some $k > n$.

Proof: $f(n+k) \ge f(n)+cnk$ (you can do better, but this is enough), so if $f(n+k)-f(n)=m$, $m \ge cnk \ge cn$ or $n \le m/c$.

Generalizing further (my goal is a theorem so general it has no particular application), the result holds if $f(n+1)-f(n) \ge g(n)$ where $g$ is strictly increasing and unbounded (an example of a slowly growing $g$ is $\log$).

Proof: $f(n+k)-f(n) \ge g(n)+g(n+1)+ ... +g(n+k-1) > kg(n)$ so, if $f(n+k)-f(n) = m$, $m > kg(n)$. The assumptions about $g$ imply that. for any particular $m$, there are only a finite number of $n$ satisfying this.

marty cohen
  • 107,799
1

If $n$ is odd and perfect square, then it is of the form $n=8k+1$. But $n+2=8k+1+2$ is also an odd number, so it must be of the form $8k'+1$ which is not.

If $n$ is even, It is of the form $n=4k^2$ while $n+2=4k^2+2$ is even but not of the form $4k'^2$. Therefore $n+2$ is not a perfect square. In each case such $n$ does not exist.

Fermat
  • 5,230
0

Any integer $\ n$, upon division by $\ 4$ leaves one of the remainders $\ 0,1,2$ and $\ 3$.

Therefore $\ n$ will be one of the forms $\ 4k, 4k+1, 4k+2$ and $\ 4k+3$, $\ k\in\mathbb{Z}$ Since $\ n$ is a perfect square, $\ n$ cannot be in the form $\ 4k+2$ and $\ 4k+3$

$ \bbox[tan,5px, border:2px solid red] {{\text{To prove it, we assume} \sqrt{n}=p. \\ \text{Then p may be even or odd.} \\ \text{Let} \; p=2q\;\text{(for even) or}\; p=2q+1\;(\text{for odd})\\ \text{Now} \;p^2=(2q)^2=4q^2=4k,\; k=q^2\in\mathbb{Z} \\ \text{or}\, p^2= (2q+1)^2=(4q^2+4q+1)=4(q^2+q)+1=4k+1,\; k\in\mathbb{Z}\\ \text{So any perfect square p is of the form 4k or 4k+1}, k\in\mathbb{Z}}}$

Thus $\ n$ will be one of the forms $\ 4k $ or $\ 4k+1$

If $\ n=4k$, then $\ n+2=4k+2$ which is not a perfect square $\ \mathbf{(just\; mentioned \;above)}$

If $\ n=4k+1$ then $\ n+2=4k+3$ which is not a perfect square $\ \mathbf{(same \;reason) }$

Therefore in whatever form a perfect square $\ n$ may be, $\ n+2$ is not perfect square.

Manjoy Das
  • 1,006
  • 7
  • 21