Why are these equations equal? I have racked my brain to death trying to understand how these two equations are equal:
$$\frac{1}{1-q} = 1 + q + q^2 + q^3 + \cdots$$
as found in http://www.math.dartmouth.edu/archive/m68f03/public_html/partitions.pdf
From what I understand if I substitute $5$ for $q$ the answer:
$$\frac{1}{1-5} = -\frac{1}{4}$$
is much different than:
$$1+5+25+125+\cdots$$
Any help understanding what is going on would be GREATLY appreciated. Thank you all for your time
 A: $S=1+q+q^2+\dots$
For any $k\in \mathbf{N}$,
Let $S_k=1+q+q^2+\dots+q^k$,
Then, $qS_k=q+q^2+q^3+\dots+q^{k+1}$.
So, $(1-q)S_k=S_k-qS_k=1+q+q^2+\dots+q^k-(q+q^2+q^3+\dots+q^{k+1})=1-q^{k+1}$
If $|q|<1$, then $q^k \longrightarrow 0$ as $k \longrightarrow \infty$, so,
$$S=\lim_{k \to \infty}S_k=\lim_{k \to \infty}\frac{1-q^{k+1}}{1-q} =\frac{1}{1-q}$$
Note, however, that the function $$f(x)=\frac{1}{1-x}$$ is valid for all $x \neq 1$. But, $f(x) = 1+x+x^2+\dots$ only for $|x| <1$.
A: One thing about functions and power series is that they are not always equal when evaluated just anywhere in the complex plane. Generally, given a power series representation of a function, it only even converges at all within a certain radius $|z|<r$ and need not converge outside of it. Within this radius though the power series representation of a holomorphic function should work. (And more generally, we can define a series $\sum c_n(z-a)^n$ around other points $z=a$ whose regions of convergence are various circles or abscissa in the complex plane.)
In particular, the geometric sum formula $\displaystyle\frac{1}{1-z}=1+z+z^2+\cdots$ only holds for $|z|<1$. This is probably the most basic generating function there is. The formula can be proven by analyzing the finite version of the formula for the partial sums and letting the number of terms tend to infinity.
Sometimes it's useful though to treat generating functions as formal power series from $\Bbb C[[x]]$. In this context we do not treat power series as functions at all: we simply think of them as infinite polynomials. Thus even things like $\sum n!z^n$ make sense as formal power series. The ring $\Bbb C[[x]]$ can be defined formally and rigorously using techniques from abstract algebra and topology. (The keywords here are "completion" and "$I$-adic topology.")
A: The sum on the RHS of your equation is an infinite geometric series, whose sum is $\frac {1}{1-q}$ only if $|q|$ is less than 1. Your example of $q=5$ is therefore not valid.
A: To see why one would think that this equation was true for some $q$, just do the long division of $1-q$ into $1$
