Find the generating function of the sequence I need to find generating function of sequence : $$\left\{0, 1, \frac12, \frac23, \frac24, \frac45, \frac46, \frac87, 1, \frac{16}9, \frac{16}{10}, \ldots\right\}$$
I saw that odd positions are $\frac{2^n}{2n+1}$ where $n$ goes from $0$ to $\infty$, but nothing else.
Any help would be appreciated.
 A: As pointed in your post and in the comments 2 hours ago:

*

*your coefficients are $a_0=0$ and for all $n\ge0,$
$$a_{2n+1}=\frac{2^n}{2n+1}\quad\text{and}\quad a_{2(n+1)}=\frac{2^n}{2(n+1)}$$

*the two following classical series are useful: for $|x|<1,$$$\sum_{k=1}^\infty\frac{x^k}k=-\ln(1-x)$$
$$\sum_{n=0}^\infty\frac{x^{2n+1}}{2n+1}=\frac12\ln\frac{1+x}{1-x}.$$
Therefore, the radius of convergence of your generating power series is $\frac1{\sqrt2}$ and a closed form is:
$$\sum_{n=0}^\infty\frac{2^n}{2n+1}z^{2n+1}+\sum_{k=1}^\infty\frac{2^{k-1}}{2k}z^{2k}$$
$$=\frac1{\sqrt2}\sum_{n=0}^\infty\frac{(z\sqrt2)^{2n+1}}{2n+1}+\frac14\sum_{k=1}^\infty\frac{(2z^2)^k}k$$
$$=\frac1{2\sqrt2}\ln\frac{1+z\sqrt2}{1-z\sqrt2}-\frac14\ln(1-2z^2).$$
A: There is always ambiguity about the "$...$", and unless it is specified that your given sequence satisfies a formula or recurrence, you cannot assume that any seemingly apparent patterns will continue. I am assuming that this sequence does satisfy a simple formula.
As you noticed, it seems that
$$a_{2n+1}=\frac{2^n}{2n+1},\qquad n\ge0$$
and similarly
$$a_0=0,\qquad a_{2n}=\frac{2^{n-1}}{2n},\qquad n\ge1.$$
So then the generating function for $a_n$ defined as $A(x)=\sum_{n\ge0}a_nx^n$ reduces to $A(x)=\sum_{n\ge1}a_nx^n,$ as the term $a_0$ vanishes.
Noting that $a_n<2^{n/2}/n$ for all $n\ge1$, we have that $|x|<1/\sqrt2$ ensures the absolute convergence of $A(x)$. Absolute convergence of $A(x)$ in turn justifies the following algebraic manipulations.
$$\begin{align}
A(x)&=\sum_{n\ge1}a_nx^n\\
&=\sum_{n\ge1}(a_{2n-1}x^{2n-1}+a_{2n}x^{2n})\\
&=\sum_{n\ge0}a_{2n+1}x^{2n+1}+\sum_{n\ge1}a_{2n}x^{2n}\\
&=\sum_{n\ge0}\frac{2^{n}}{2n+1}x^{2n+1}+\sum_{n\ge1}\frac{2^{n-1}}{2n}x^{2n}\\
&=\frac{1}{\sqrt{2}}\sum_{n\ge0}\frac{(x\sqrt2)^{2n+1}}{2n+1}+\frac14\sum_{n\ge1}\frac{(2x^2)^{n}}{n}.
\end{align}$$
To evaluate these series in closed form, consider the geometric series
$$\sum_{n\ge0}t^n=\frac{1}{1-t},$$
which converges absolutely for $|t|<1$.
Integrating both sides over $t\in[0,x]$ for $|x|<1$,
$$\sum_{n\ge1}\frac{x^n}{n}=-\log(1-x).$$
Splitting the sum into even and odd parts,
$$\sum_{n\ge0}\frac{x^{2n+1}}{2n+1}=-\log(1-x)-\frac{1}{2}\sum_{n\ge1}\frac{x^{2n}}{n}=-\log(1-x)+\frac12\log(1-x^2).$$
Thus,
$$A(x)=\frac{1}{\sqrt2}\left(\frac12\log(1-2x^2)-\log(1-x\sqrt2)\right)-\frac{1}{4}\log(1-2x^2),$$
which is
$$A(x)=\frac{\sqrt2-1}{4}\log(1-2x^2)-\frac{1}{\sqrt2}\log(1-x\sqrt2).$$
A: Let $a_0=0$, $a_1=1$, $a_2=\frac{1}{2}$, $a_3=\frac{2}{3}$, $a_4=\frac{2}{4},\dots$ and notice that the denominator of $a_n$ is $n$. For the numerator, notice that these are powers of $2$ and come in pairs. The coming in pairs part is ensured by $\lfloor\frac{n-1}{2}\rfloor=\max\{k\in\mathbb Z:k\le\frac{n-1}{2}\}$, i.e. the function rounding down. Combining this gives $a_n=\frac{2^{\lfloor\frac{n-1}{2}\rfloor}}{n}$ and hence the generating function $\sum_{n=1}^\infty\frac{2^{\lfloor\frac{n-1}{2}\rfloor}}{n}x^n$.
The sum for even $n$ is $\sum_{k=1}^{\infty}\frac{2^{k-1}}{2k}x^{2k}=\frac{1}{4}\sum_{k=1}^{\infty}\frac{1}{k}(2x^2)^{k}=-\frac{1}{4}\ln|1-2x^2|$, using the anti-derivative of the geometric series $\sum_k b^k=\frac{1}{1-b}$ to obtain $\sum_k\frac{1}{k+1}b^{k+1}=-\ln|1-x|$. The sum for odd $n$ is $\sum_{k=0}^{\infty}\frac{2^{k}}{2k+1}x^{2k+1}=\frac{1}{\sqrt{2}}\sum_{k=0}^{\infty}\frac{1}{2k+1}(\sqrt{2}x)^{2k+1}=\frac{1}{2\sqrt{2}}\ln\frac{1+\sqrt{2}x}{1-\sqrt{2}x}$, the series expansion of the inverse hyperbolic tangent, which I found using WolframAlpha. So, in total we get
$$\sum_{n=1}^\infty\frac{2^{\lfloor\frac{n-1}{2}\rfloor}}{n}x^n
=-\frac{1}{4}\ln|1-2x^2|+\frac{1}{2\sqrt{2}}\ln\frac{1+\sqrt{2}x}{1-\sqrt{2}x}.$$
