Sequences of lengths occur naturally, and with notable frequency they fall into the category of the Geometric Series . The series of ratios expressable by a compact formula, being considered first as a finite ($n$ any real number) series of ratios and then taken a step further to the case when the number of ratios being summed goes to infinity. The geometric series is (like the trigonometric functions sine and cosine are) best simply memorized, because as a set of operations textually surfacing the salient characteristics of the number, one of which the sum of ratios is, they are utilized matching suitability going forward with analysis of physical systems.
The series for a common ratio of $1/2=0.5$ is solvable geometrically by drawing the sequence, as the Wikipedia page on the subject displays, which doesn't itself hint at the algrebra required to discover the generalized formula. For each set of sequential additive (and subtractive) member terms (a.k.a. an infinite series), there is the use of a parameter (variable) which shows how the sequence is constructed from the following notation elements:
Naturally, with familiarity, one associates the exponential place (as opposed to as part of a binomial, multiple factors of binomials, or something which naturally exists in the formal analysis of fields around real distributed matter) of the variable being summed over (varying from term to term) with the geometric series type of series, i.e. the geometric Series is associated with one appearance of $n$ and it's in the exponent position (unlike the formulas in $n$ displayed above, which don't have $n$ in the exponent).
The geometric series is expressed as a sum of terms formulated as $r^n$ where $0\lt r\lt 1$ (that is to say $r$ is anywhere between zero and one): $$ \sum r^n = r^0 + r^1 + r^2 + r^3 + \cdots $$ When the starting term is $n=0$ then the series is simply offset by one regardless of $r$ ( $1=r^0$ ) so it is omitted without confusion (the $n\gt0$ terms are what's important, that's $n$ greater and not equal to zero), and used that way in the following.
For the $r=0.5$ geometric series, we observe the sequence displayed (each on top the previous) in a unit-length horizontal rectangle as forever adding a half again of the previous term in the summation thus quite probably equalling one, by induction on the following seven terms of the series:
When we employ an $r$ value of less than one half then the summation is less than one, which is graphically depicted in the same unit rectangle, so we generalize $r\lt 1/2$ for any $r$ the sum gets closer to zero.
The Wikipedia link above has a picture of this drawn with contiguous (the next beginning where the previous ended) squares inscribed in a unit square (a square with a side length equal to one). That sequence of sides ($1/2 + 1/4 + 1/8 +\ldots$) correctly (appears to) sum to one, because the sequence is comprised of steps which each leave a remainder of the unit (1) as $2^{-n}$—halving the distance to the unit, thus never reaching it in an infinitely precise way, and at the same time the partial-sum G.S. up to $n=3$ amounts to $0.875$, leaving a maximum of $0.125$ for the remaining terms in the infinite series sum giving appearance that the $r=0.5$ series summing to one. $r=1/3$ converges to $1/2$, which really is not obvious without the algebra for the formula. The formula for the geometric series is as follows:
Where $r$ is a constant fraction $0\lt r \lt 1$, with the variable being $m$. This compact formula is apparent after the following steps, thanks to Bernouli. First we take the partial series (sum of the series to some finite $m$), and multiply by the binomial $(1-r)$: $$ (1-r)\left(\sum^{m}_{n=0} r^n\right) $$ Note the series we want to work with is the one that starts with $n=0$. Which is to say subtract, $r$-times the zero-based series from that same series, like so: $(1-r)S_m=(1)(S_m)-(r)(S_m)$. $$ = (1 +r + r^2 +\dots+r^m)-(r + r^2 + r^3 + \dots+r^{m+1}) $$ Since there isn't a one in the second set of parentheses (series on the right starts with the $n=1$ term), and there is a $n=0$ term in the left parentheses, we have a one in the sum output followed by the last term left unpaired in negation $rr^m=r^{m+1}$. $$ = (1) +(r-r) + (r^2-r^2) +\dots+(r^m-r^m) + (0-r^{m+1}) $$ Finally we are left with the following reduction: $$ = 1-r^{m+1} $$ And so the formula is completed, after adjusting the formula for the appropriate starting term of the desired series.
Changing the variable in the geometric series formula, as $m=n-1$, shifts the formula by one on the input: $$ S_{n-1}=\sum^{n-1}_{x=0} r^x = \frac{1 - r^n}{1-r} $$
Below are plots of the partial-sums of the geometric series for $r=\{1/4, 1/3, 1/2, 3/5\}$, which includes the points continuously between each of the integer points ($n$) by using a continuous variable $x$ and highlights drawn for $n=x=\{1, 2, 5\}$. Note that the plot ordinate range starts at one because the $n=0$ term is being included.
The one-over-one-minus-$r$ function (the infinite sum formula) is valid for ratios $r\lt 1$, and as $r$ gets closer to one the function gets arbitrarily large, because you can make the denominator, $1-r$, arbitrarily small.