# Proof by cases: If n is a positive integer and there is a perfect square in $\{k \in \mathbb{Z} | n \leq k \leq 2n\}$

If n is a positive integer and there is a perfect square in $\{k \in \mathbb{Z} | n \leq k \leq 2n\}$, then there is a perfect square in $\{k \in \mathbb{Z} | n + 1 \leq k \leq 2n + 2\}$.

There seems to be 3 cases here.

I have found the first and second case,

Case 1: $n$ is not a perfect square.

Case 2: If $n$ is the only perfect square.

I seem to be unable to find a 3rd case here, but I do not think I can complete this proof with just these 2 cases.

--

I have an example proof here, which makes several mistakes, and I must identify some of the mistakes.

-- example --

Proof: Case 1: If $n$ is not a perfect square, then we must be done.

Case 2: If $n$ is the only perfect square, then we can say $n=a^2$

The next perfect square is $(a+1)^2 = a^2+2a+1$, which is definitely in $\{k \in \mathbb{Z} | n + 1 \leq k \leq 2n + 2\}$.

In either case, we have shown that if $n$ s a positive integer and there is a perfect square in $\{k \in \mathbb{Z} | n \leq k \leq 2n\}$, then there is a perfect square in $\{k \in \mathbb{Z} | n + 1 \leq k \leq 2n + 2\}$.

-- end of example --

This proof is incomplete, and I need to edit it

There are 2 non-trivial claims in this example that are correct, but not explained. I need to identify them, and provide the argument that should have been written.

I think the 2 non trivial claims are:

1: If n is not a perfect square, then we must be done.

2: $a^2+2a+1$ is definitely in $\{k \in \mathbb{Z} | n + 1 \leq k \leq 2n + 2\}$.

I'm not fully sure if these are non-trivial, and I don't know how to fully explain them if they are.

Any feedback or help would be appreciated here. Thank you.

• Do you want to use the square between $n$ and $2n$? Otherwise independent of that, a perfect square can be found between $n+1$ and $2n+2$. Oct 27, 2015 at 17:46
• One way of proving that these statements are true is :If $n$ is not a perfect square then the perfect square between $n$ and $2n$ is still a perfect square between $n+1$ and $2n+2$. And if $n= a^2$ then $2n + 2 = 2a^2 + 2$ and we just need to show $a^2 + 2a +1 \leq 2a^2 + 2$. Can you see this? Oct 27, 2015 at 17:54
• I can see this. I just need to expand on the explicit statement of there being a perfect square between $n+1$ and $2n+2$ if $n$ is not a perfect square. Oct 27, 2015 at 21:09

We are told there is a perfect square between n and 2n inclusive. This means two possible cases:

Case 0: There is a perfect square between n + 1 and 2n inclusive. In this case there is nothing to do.

Case 1: Not case 0. Then $n$ must be the perfect square. And n + 1 through 2n are not.

There doesn't seem to be a third case.

Let $n = k^2$ Then $n = k^2 < (k+1)^2 = k^2 + 2k + 1 = n + 2k + 1$.

Case 1a: n = k = 1, $(k+1)^2 = 4 = 2n + 2$

Case 2a: k = 2, n = 4. $n + 2k + 1 = 2n + 1$

Case 2c: k > 2, $n + 2k + 1 < 2n + 1$ (which is a subset of case 0; and we didn't really need to use that we were assuming the strict case that there were no squares in n + 1 through 2n).

=================

"I think the 2 non trivial claims are:"

"1: If n is not a perfect square, then we must be done."

This is trivial! if n is not a perfect square we were told there is a perfect square between n and 2n so it must be between n+1 and 2n which is a subset of the numbers between n+1 and 2n + 2.

"2: $a^2+2a+1$ is definitely in {k∈Z|n+1≤k≤2n+2}."

This isn't trivial but it is easy for a>2. (then \$a^2 + 2a + 1 = n + 2a + 1 < n + a^2 + 1 = 2n + 1).

And we can do a = 1,2 on a case by case basis.

• Thanks for the response. Could you explain briefly how you came to "there is a perfect square between n + 1 and 2n inclusive"? Oct 27, 2015 at 21:14
• because we were told there was a perfect square between n and 2n inclusive! But it isnt n. So it must be between n+1 and 2n exclusively. Oct 27, 2015 at 21:16