Supremum and infimum of a set

Hello everyone,
I found this exercise on the internet:
find the supremum and infimum of the following set A1, where
A1 = {2(-1)^(n+1)+(-1)^((n^2+n)/2)(2+3/n): n belongs to |N*}
being |N* = |N\{0}

The solution was:
A1 = {-3, -11/2, 5}U{3/4k, -3/(4k+1),-4-3/(4k+2),4+3/(4k+3) : k belongs to |N*}

I don't get the reasoning behind. what's k? why and how did they use it?

It would help us a lot if you would use this to make your post more readable.

ok, here i go:

find the supremum and infimum of the following set A1, where
$A1 = {2(-1)^{n+1} + (-1)^{(\frac{n^2+n}{2})} ( 2+ \frac{3}{n}): n \in \mathbb{N}*}$

being $\mathbb{N}^{*} = \mathbb{N} \setminus \Big\{0\Big\}$

The solution was:
$A1 = \Big\{-3,\frac{-11}{2}, 5\Big\} \cup \Big\{\frac{3}{4k}, \frac{-3}{4k+1},-4- \frac{3}{4k+2},4+ \frac{2}{4k+3}\Big\} : k \in \mathbb{N}$

what's the reasoning behind this solution? why using the k?

That solution doesn't really make any sense. You are asked to give two values, the infimum and the supremum. I don't understand why the solution would give that as answer...

According to the text, thanks to this proceeding you prove that:
$inf A1= - \frac{11}{2}, supA1=5$
(even knowing it still doesn't help me to understand how they solved that)

sorry, didn't know latex didn't work on quick replies.
here i go again:

According to the text, thanks to this proceeding you prove that:
$inf A1= - \frac{11}{2}, supA1=5$
(even knowing it still doesn't help me to understand how they solved that)

Ah, now it makes sense. What they essentially do is write that A1 in another form. Why did they do that? Well because that other form makes it easier to see what the infimum and the supremum actually is.

Now, do you understand that the other form of A1 is equal to your original set?? That would be the first thing you might want to figure out.

no, i don't get how the set was manipulated :(

The idea is that things like $(-1)^{n+1}$ and $(-1)^{(n^2+n)/2}$ are annoying expressions. They are either 1 or -1. Can you find conditions on n on when the result is 1 and when it is -1??

Let me do the first: $(-1)^{n+1}$ is 1 if n+1 is even and is -1 if n+1 is odd. So we get the following result

$$2(-1)^{n+1}+(-1)^{(n^2+n)/2}(2+\frac{3}{n})=\left\{\begin{array}{ll} 2+(-1)^{(n^2+n)/2}(2+\frac{3}{n}) & \text{if n is odd}\\ -2 + (-1)^{(n^2+n)/2}(2+\frac{3}{n}) & \text{if n is even}\end{array}\right.$$

Can you do a similar thing to get rid of the $(-1)^{(n^2+n)/2}$?

thankss, much clearer now :)