I want to convert a decimal (base 10) number to its binary (base 10) equivalent. The binary string has to be of infinite length. Is any of the following functions correct for non-negative integers $x$: $$ x = \sum_{i=0}^\infty 2^i $$ or $$ x = \sum 2^i ; i \in \{ 0,1,2,...\} $$ for unique $i$, in both cases.
Edit: I know that a more appropriate function would be
$$ x = \sum_{i=0}^\infty y_i2^i ; y_i \in \{ 0,1\} $$
but I wanted to know if any of the above two formulations would be equivalent to this.
Thanks