Generating the sequence $1,\frac{1}{2},3,\frac{1}{4},5,\frac{1}{6},\ldots$ I cannot figure out the $n$th term. 
 A: If $n$ is odd, we just get $n$. For example the $3$rd term is $3$.
If $n$ is even, we just get $1/n$. For example the $8$th term is $1/8$.
We would express this as $n^{p}$ where $p$ is some power. This power is $1$ if $n$ is odd, and it is $-1$ if $n$ is even. We know that $(-1)^n$ is $1$ if $n$ is even, and $-1$ if $n$ is odd, therefore $(-1)^{n-1}$ is $1$ if $n$ is odd, and it is $-1$ if $n$ is even. So we find out that: $n^{\displaystyle(-1)^{n-1}}$ is the right answer using the same line of reasoning.
A: $$
a_n=\begin{cases}
n, &n\text{ odd},\\
1/n, &n\text{ even},
\end{cases}
\quad n=1,2,\dots
$$
A: It is noted that,the even terms follow a geometric series with common ratio = 2. But the odd terms are given as an arithmetic progression series terms.
that is, odd terms can be written as 2n-1 while for the even's it is 2^-n,where n is positive integer.
A: Is the following approach valid:
$$a_n = \frac{1}{2} \left( \frac{1}{n} (1-(-1)^{n+1}) + n \left(1-(-1)^n\right) \right)?$$
It does the trick, at least in Mathematica.
Hope this helps.
Cheers!
