+0

# If $\left\lfloor n^2/4 \right\rfloor - \lfloor n/2 \rfloor^2 = 2$, then find all integer values of $n$.

+1
69
3
+281

If $$\left\lfloor n^2/4 \right\rfloor - \lfloor n/2 \rfloor^2 = 2$$, then find all integer values of $n$.

michaelcai  Sep 22, 2017

#2
+26240
+4

Here's a more general solution:

.

Alan  Sep 23, 2017
Sort:

#1
+90567
+2

The only answer is 5.  I did this by examining a table of values.

There is bound to be a more elegant way of doing it but I do not know what it is.

$$\left\lfloor n^2/4 \right\rfloor - \lfloor n/2 \rfloor^2 = 2$$

 n -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 $$\left\lfloor n^2/4 \right\rfloor$$ 25 20 16 12 9 6 4 2 1 0 0 0 1 2 4 6 9 12 16 20 25 $$\lfloor n/2 \rfloor^2$$ 25 25 16 16 9 9 4 4 1 1 0 0 1 1 4 4 9 9 16 16 25 $$\left\lfloor n^2/4 \right\rfloor - \lfloor n/2 \rfloor^2$$ 0 -5 0 -4 0 -3 0 -2 0 -1 0 0 0 1 0 2 0 3 0 4 0

So I can see that for all even numbers, positive and negative the answer will be zero.

For the odd numbers a pattern emerges.

It is clear to me that the only integer value of n to make this true is 5

Melody  Sep 23, 2017
#2
+26240
+4

Here's a more general solution:

.

Alan  Sep 23, 2017
#3
+90567
+1

Thanks Alan, your solution is really neat :)

Melody  Sep 23, 2017

### 25 Online Users

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.  See details