Is there any way to define an analytical function in a region that's contained by 0 and 1 that will correspond with the following series:
$1$, $1$, $\frac12$, $\frac12$, $\frac13$, $\frac13$, $\dots$, $\frac{1}{n}$, $\frac{1}{n}$
(such that $f(1) = 1, f(2) = 1, f(3) = \frac12, f(4) = \frac12, \dots$)?
I've tried using some combinations of exponents and $\sin$ but couldn't find any.
Thanks in advance!