# A function that creates a partition of values such that the sum is 1

I'm trying to find a function $g:\mathbb N\cup\left\{0\right\} \rightarrow\left(0,1\right)$, such that, given a (real) value $k \in \left(0,1\right)$ and an integer $i>1$, allows me to calculate a partition of the interval $(0,1)$ that fulfills the following conditions:

1. $k$ is a parameter of the function.
2. The function only has a positive value if $0 \leq j\leq i$, and zero on every other case.
3. The sum of the function results for every $j \in \left\{ 0,1,\dots,i\right\}$ is 1: $$\sum_{j=0}^{i}g_k\left(j\right)=1$$
4. For every $j \in \left\{1,\dots,i\right\}$:$$g_k\left(j\right)=k·g_k\left(j-1\right)$$

Condition (3) implies the following: $$\underset{k\rightarrow1}{\lim}g_k\left(j\right)=g_k\left(j-1\right)\ ,\ j\in\left\{ 1,2,\dots,i\right\}$$

I know such function exists, but I don't remember the function (and I don't find any reference to it), and I've been struggling with this for some time.

Could you point me in the right direction? (a name for such function would be enough)

-
When you say $g(j)$, do you mean $g(x_j)$, where $x_j$ are the terms of some partition of $(0,1)$? Or do you mean the actual integers $1,\dots,i$ (none of which are contained in $(0,1)$? – Donkey_2009 Sep 19 '13 at 20:48
@Donkey_2009 No, I mean exactly the natural numbers... I'm editing the question to make it more clear – Barranka Sep 19 '13 at 20:49
When you talk about the limit as $k\to 1$, what topology are you taking on the natural numbers? – Donkey_2009 Sep 19 '13 at 20:56
$k$ is a real number in the interval $(0,1)$ – Barranka Sep 19 '13 at 20:56
OK, that's right. But then $\lim_{k\to1}g(j)=g(j)$, since $g(j)$ doesn't depend on $k$ at all. – Donkey_2009 Sep 19 '13 at 20:58

You just need to find $g(0)$, for then $g(i)=k^ig(0)$ You have a geometric series, so $$\sum_{j=0}^{i}g\left(j\right)=\sum_{j=0}^{i}g(0)k^j=g(0)\frac {1-k^{i+1}}{1-k}=1\\g(0)=\frac {1-k}{1-k^{i+1}}$$