Skip to content

Instantly share code, notes, and snippets.

@Nikolaj-K
Created August 4, 2025 19:33
Show Gist options
  • Save Nikolaj-K/7855eadb47ba7958e41563633667e66e to your computer and use it in GitHub Desktop.
Save Nikolaj-K/7855eadb47ba7958e41563633667e66e to your computer and use it in GitHub Desktop.
A generalization of the geometric sum away from using just monomials
"""
Proof prsented in the video
https://youtu.be/Ydyhe7KdRsk
"""
Reminder:
=== Theorem 1, the geometric sum and series formulae ===
$\sum_{k=0}^n a^k = \dfrac{a^{n+1}-1}{a-1}$
$\lim_{n\to\infty}\sum_{k=0}^n a^k = \dfrac{0-1}{a-1}$ should $a^n\to 0$
...
Now for a sequence $(h_j)_j^n$ a ring, with $h_{i+1} - e$ invertible, define
${\mathrm{ratio}}_{k,i} := \dfrac{h_{k+1}-e}{h_{i+1} - e}$
${\mathrm{prod}}_k := \prod_{j=1}^k h_j$
=== Theorem 2 ===
$\sum_{k=0}^n {\mathrm{prod}}_k \cdot {\mathrm{ratio}}_{k,i} = \dfrac{{\mathrm{prod}}_{n+1} - e}{h_{i+1} - e}$
(With $i$ arbitrary. Proof in this video, below.)
The geometric sum formula is ofc given via the constant sequence $h_j=a$.
Possible this is most naturally read as a decomposition of the product ${\mathrm{prod}}_{n+1}$ into summands.
E.g. with $h_j := e + \delta_j$, it reads
$\prod_{j=1}^{n+1} \left(e + \delta_j\right) = e + \sum_{k=0}^n \delta_{k+1}\cdot \prod_{j=1}^k \left(e + \delta_j\right)$
But first, a note and digression: The geometric sum formula generalizes, slightly, to
=== Theorem 3 ===
$U = \sum_{k=0}^n a^k\cdot b^{n-k} = b^n \sum_{k=0}^n \left(\frac{a}{b}\right)^k = \dfrac{a^{n+1}-b^{n+1}}{a-b}$
(Maybe a natural way to understand this $U$ is as the solution of $a^{n+1}+b\cdot U = b^{n+1} + a\cdot U$.)
Prove Therorem 3 from Theorem 1, or by induction.
Intuition pump: The claim is
$\sum_{k=0}^n (a-b)\cdot a^k\,b^{n-k} = a^{n+1}-b^{n+1}$,
i.e. lots of cancelation trough $a-b$, and consider that e.g.
<code>
n=5
U = Table[a^k b^(n-k), {k,1,n}]
U == {a b^4, a^2 b^3, a^3 b^2, a^4 b, a^5}
</code>
==== Proof of Theorem 1 ====
Let $(g_k)_k$ be a sequence of invertible group elements with at least $n+1$ elements.
Denote by $\hat\prod$ the finite right-recursive product in the group.
(We use a different product, denoted $\prod$, right below.)
Then, due to telescoping,
$\hat\prod_{k=0}^n g_k\cdot g_{k+1}^{-1} = g_0\cdot g_1^{-1}\cdot g_1\cdot g_2^{-1}\cdot g_2\cdot g_3^{-1}\cdots \cdot g_{n+1}^{-1} = g_0\cdot g_{n+1}^{-1}$
For an abelian group, we get
$g_{n+1} - g_0 = \sum_{k=0}^n g_{k+1} - g_k$
For another sequence $(h_k)_k$ with $h_0:=0$, if the abelian group is actually a ring
and $g_k = \prod_{j=0}^k h_j$ (where $\prod$ now uses the multiplication of the ring),
we get the following "telescoping in a ring" formula
$\left(\prod_{j=1}^{n+1} h_j\right) - e = \sum_{k=0}^n (h_{k+1}-e)\cdot \prod_{j=1}^k h_j$
Now obtain the result by dividing by $h_{i+1} - e$ for some $i$.
To see the cancalation in action, e.g. for $n=2$:
The terms on the RHS are
$e + (h_1-e)\cdot e + (h_2-e)\cdot h_1 + (h_3-e)\cdot h_2\cdot h_1$
of which survives the product
$h_3\cdot h_2\cdot h_1$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment