If $(X_n, d_n)$ ($n =1,2,3,\ldots$) are metric spaces, you are trying to define a metric on the countable product $\prod_n X_n$.
The idea of the formula is that we replace every metric $d_n$ by an equivalent one (inducing the same topology) such that $d_n \le 1$. In your formula you take $d'_n = \frac{d_n}{1+d_n}$, which works, but $d'_n = \max(d_n,1)$ would also work, and is easier to show this for.
Then $d((x_n)_n, (y_n)_n) = \sum_n \frac{1}{2^n} d'_n(x_n, y_n)$ is the defined metric on $\prod_n X_n$ and indeed the term $\frac{1}{2^n}$ in combination with $d'_n \le 1$ ensures that for all points
$$d((x_n)_n, (y_n)_n) \le \sum_n \frac{1}{2^n} = 1$$ and the sum is always well-defined. And in this answer I showed that $d$ induces the product topology, which is thus metrisable. There I also use the fact that we have a convergent series of values, to estimate the tails.
But all proofs work just the same when we use $c_n > 0$ as coefficients with $\sum_n c_n$ convergent. The $\frac{1}{2^n}$ are not important as such.