<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=AOCP%2FInfinite_Series</id>
	<title>AOCP/Infinite Series - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=AOCP%2FInfinite_Series"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=AOCP/Infinite_Series&amp;action=history"/>
	<updated>2026-06-20T10:27:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=AOCP/Infinite_Series&amp;diff=30734&amp;oldid=prev</id>
		<title>Admin: Create AOCP/Infinite Series page covering infinite series topics from Knuth&#039;s Volume 1 (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=AOCP/Infinite_Series&amp;diff=30734&amp;oldid=prev"/>
		<updated>2026-06-20T04:55:51Z</updated>

		<summary type="html">&lt;p&gt;Create AOCP/Infinite Series page covering infinite series topics from Knuth&amp;#039;s Volume 1 (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Knuth Volume 1: Fundamental Algorithms=&lt;br /&gt;
&lt;br /&gt;
==Chapter 1: Basic Concepts: Infinite Series==&lt;br /&gt;
&lt;br /&gt;
===Definitions===&lt;br /&gt;
&lt;br /&gt;
An infinite series is a sum of infinitely many terms:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} a_k = a_0 + a_1 + a_2 + \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The infinite series is defined as the limit of its partial sums:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
S_n = \sum_{k=0}^{n} a_k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\lim_{n \to \infty} S_n = S&amp;lt;/math&amp;gt; exists and is finite, the series converges to &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. Otherwise, it diverges.&lt;br /&gt;
&lt;br /&gt;
In Knuth&amp;#039;s treatment, infinite series appear throughout the mathematical preliminaries: in sums and products (Section 1.2.3), harmonic numbers (Section 1.2.7), Fibonacci numbers (Section 1.2.8), generating functions (Section 1.2.9), and the analysis of algorithms (Section 1.2.10).&lt;br /&gt;
&lt;br /&gt;
===Absolute and Conditional Convergence===&lt;br /&gt;
&lt;br /&gt;
A series &amp;lt;math&amp;gt;\sum a_k&amp;lt;/math&amp;gt; is &amp;#039;&amp;#039;&amp;#039;absolutely convergent&amp;#039;&amp;#039;&amp;#039; if &amp;lt;math&amp;gt;\sum |a_k|&amp;lt;/math&amp;gt; converges.&lt;br /&gt;
&lt;br /&gt;
If a series converges but is not absolutely convergent, it is &amp;#039;&amp;#039;&amp;#039;conditionally convergent&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Knuth notes that absolutely convergent series can be manipulated much more freely than conditionally convergent series. For absolutely convergent series, we can:&lt;br /&gt;
* Rearrange terms arbitrarily&lt;br /&gt;
* Multiply series together&lt;br /&gt;
* Group terms in any way&lt;br /&gt;
&lt;br /&gt;
Conditionally convergent series require more care: rearranging terms can change the sum, or even cause divergence.&lt;br /&gt;
&lt;br /&gt;
===The Geometric Series===&lt;br /&gt;
&lt;br /&gt;
The geometric series is the most fundamental infinite series:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} x^k = 1 + x + x^2 + x^3 + \dots = \dfrac{1}{1-x} \qquad |x| &amp;lt; 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is derived by considering the partial sum:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
S_n = \sum_{k=0}^{n} x^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multiplying by &amp;lt;math&amp;gt;(1-x)&amp;lt;/math&amp;gt; yields the telescoping sum:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(1-x) S_n = (1 + x + x^2 + \dots + x^n) - (x + x^2 + \dots + x^{n+1}) = 1 - x^{n+1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
S_n = \dfrac{1 - x^{n+1}}{1 - x}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt;|x| &amp;lt; 1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;x^{n+1} \to 0&amp;lt;/math&amp;gt; as &amp;lt;math&amp;gt;n \to \infty&amp;lt;/math&amp;gt;, giving the closed form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} x^k = \dfrac{1}{1-x}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A closely related form generalizes this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} a x^k = \dfrac{a}{1 - x} \qquad |x| &amp;lt; 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and more generally:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} (a x^k) = \dfrac{a}{1 - x}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} x^{k} (a) = a \dfrac{1}{1-x}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the shifted series:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=m}^{\infty} x^k = \dfrac{x^m}{1 - x} \qquad |x| &amp;lt; 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The Finite Geometric Sum===&lt;br /&gt;
&lt;br /&gt;
Before taking limits, the finite geometric sum is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{n} x^k = \dfrac{1 - x^{n+1}}{1 - x} \qquad x \neq 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt;x = 1&amp;lt;/math&amp;gt;, each term contributes 1, so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{n} 1 = n + 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The Harmonic Series===&lt;br /&gt;
&lt;br /&gt;
The harmonic series is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_{\infty} = \sum_{k=1}^{\infty} \dfrac{1}{k} = 1 + \dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{4} + \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This series &amp;#039;&amp;#039;&amp;#039;diverges&amp;#039;&amp;#039;&amp;#039;, though it does so very slowly. The partial sums are the harmonic numbers (see [[AOCP/Harmonic Numbers]]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_n = \sum_{k=1}^{n} \dfrac{1}{k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knuth proves divergence by showing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_{2^m} \geq 1 + \dfrac{m}{2}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which grows without bound as &amp;lt;math&amp;gt;m \to \infty&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The harmonic series is important in the analysis of algorithms, where it frequently appears in the form &amp;lt;math&amp;gt;H_n \approx \ln n + \gamma&amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; being the [[Euler-Mascheroni Constant]].&lt;br /&gt;
&lt;br /&gt;
===The Exponential Series===&lt;br /&gt;
&lt;br /&gt;
The exponential series defines the constant &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
e^z = \sum_{k=0}^{\infty} \dfrac{z^k}{k!} = 1 + z + \dfrac{z^2}{2!} + \dfrac{z^3}{3!} + \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This series converges for all real and complex &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;. In particular:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
e = \sum_{k=0}^{\infty} \dfrac{1}{k!} = 1 + 1 + \dfrac{1}{2} + \dfrac{1}{6} + \dfrac{1}{24} + \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The exponential generating function &amp;lt;math&amp;gt;\sum a_k \frac{z^k}{k!}&amp;lt;/math&amp;gt; is a key tool in combinatorics, discussed extensively in Section 1.2.9.&lt;br /&gt;
&lt;br /&gt;
===The Logarithm Series===&lt;br /&gt;
&lt;br /&gt;
Knuth gives two important logarithm series:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\ln(1+z) = \sum_{k=1}^{\infty} \dfrac{(-1)^{k+1}}{k} z^k = z - \dfrac{z^2}{2} + \dfrac{z^3}{3} - \dfrac{z^4}{4} + \dots \qquad |z| &amp;lt; 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\ln \left( \dfrac{1}{1-z} \right) = \sum_{k=1}^{\infty} \dfrac{z^k}{k} = z + \dfrac{z^2}{2} + \dfrac{z^3}{3} + \dfrac{z^4}{4} + \dots \qquad |z| &amp;lt; 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the connection to harmonic numbers: the coefficients of the second series are &amp;lt;math&amp;gt;\frac{1}{k}&amp;lt;/math&amp;gt;, which are the terms of the harmonic series.&lt;br /&gt;
&lt;br /&gt;
===The Binomial Series===&lt;br /&gt;
&lt;br /&gt;
The binomial theorem extends to infinite series when the exponent is not a nonnegative integer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(1 + z)^r = \sum_{k=0}^{\infty} \binom{r}{k} z^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This converges for &amp;lt;math&amp;gt;|z| &amp;lt; 1&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is arbitrary, and for all &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is a nonnegative integer (in which case it terminates).&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is a negative integer, we obtain an important special case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dfrac{1}{(1-z)^{n+1}} = \sum_{k=0}^{\infty} \binom{n+k}{n} z^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, when &amp;lt;math&amp;gt;n = 0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dfrac{1}{1-z} = \sum_{k=0}^{\infty} z^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is the geometric series.&lt;br /&gt;
&lt;br /&gt;
===Differentiation and Integration of Series===&lt;br /&gt;
&lt;br /&gt;
For a generating function &amp;lt;math&amp;gt;G(z) = a_0 + a_1 z + a_2 z^2 + \dots&amp;lt;/math&amp;gt;, we can differentiate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
G&amp;#039;(z) = a_1 + 2 a_2 z + 3 a_3 z^2 + \dots = \sum_{k \geq 0} (k+1) a_{k+1} z^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and integrate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int_{0}^{z} G(t) dt = a_0 z + \dfrac{1}{2} a_1 z^2 + \dfrac{1}{3} a_2 z^3 + \dots = \sum_{k \geq 1} \dfrac{1}{k} a_{k-1} z^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These operations, applied to known series, generate new ones. For example, differentiating the geometric series:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dfrac{d}{dz} \left( \dfrac{1}{1-z} \right) = \dfrac{1}{(1-z)^2} = \sum_{k \geq 0} (k+1) z^k = 1 + 2z + 3z^2 + 4z^3 + \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Integrating the geometric series gives:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int_{0}^{z} \dfrac{dt}{1-t} = \ln \left( \dfrac{1}{1-z} \right) = \sum_{k \geq 1} \dfrac{z^k}{k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Telescoping Series===&lt;br /&gt;
&lt;br /&gt;
A telescoping series is one in which most terms cancel. The general form is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{n} (b_{k+1} - b_k) = b_{n+1} - b_0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an infinite telescoping series, if &amp;lt;math&amp;gt;\lim_{n \to \infty} b_n = L&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} (b_{k+1} - b_k) = L - b_0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This technique is used throughout Knuth&amp;#039;s text, particularly in Section 1.2.3 (Sums and Products). A classic example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=1}^{n} \dfrac{1}{k(k+1)} = \sum_{k=1}^{n} \left( \dfrac{1}{k} - \dfrac{1}{k+1} \right) = 1 - \dfrac{1}{n+1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking the limit as &amp;lt;math&amp;gt;n \to \infty&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=1}^{\infty} \dfrac{1}{k(k+1)} = 1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternating Series===&lt;br /&gt;
&lt;br /&gt;
An alternating series has terms that alternate in sign:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=0}^{\infty} (-1)^k a_k = a_0 - a_1 + a_2 - a_3 + \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The alternating harmonic series converges (conditionally):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=1}^{\infty} \dfrac{(-1)^{k+1}}{k} = 1 - \dfrac{1}{2} + \dfrac{1}{3} - \dfrac{1}{4} + \dots = \ln 2&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knuth uses alternating series in several identities, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k} \binom{n}{k} (-1)^k = (1-1)^n = 0^n&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which equals &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;n = 0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;n &amp;gt; 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Infinite Series in Generating Functions===&lt;br /&gt;
&lt;br /&gt;
A generating function &amp;lt;math&amp;gt;G(z)&amp;lt;/math&amp;gt; for a sequence &amp;lt;math&amp;gt;\langle a_n \rangle&amp;lt;/math&amp;gt; is the infinite series:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
G(z) = a_0 + a_1 z + a_2 z^2 + a_3 z^3 + \dots = \sum_{k \geq 0} a_k z^k&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knuth treats these as formal power series: the question of convergence is often set aside, and operations on the series are justified algebraically. When convergence matters, the series is considered within its radius of convergence.&lt;br /&gt;
&lt;br /&gt;
The key operations on generating functions (addition, shifting, multiplication, differentiation, integration) all correspond to operations on the underlying infinite series. See [[AOCP/Generating Functions]].&lt;br /&gt;
&lt;br /&gt;
===Sum of a Sequence via Generating Functions===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;G(z) = \sum_{k \geq 0} a_k z^k&amp;lt;/math&amp;gt; is the generating function for &amp;lt;math&amp;gt;\langle a_n \rangle&amp;lt;/math&amp;gt;, then the generating function for the partial sums is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dfrac{1}{1-z} G(z) = \sum_{n \geq 0} \left( \sum_{k=0}^{n} a_k \right) z^n&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This follows from multiplying &amp;lt;math&amp;gt;G(z)&amp;lt;/math&amp;gt; by the geometric series &amp;lt;math&amp;gt;\frac{1}{1-z} = \sum_{k \geq 0} z^k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Convergence Tests===&lt;br /&gt;
&lt;br /&gt;
Knuth mentions several tests for convergence, including:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ratio Test:&amp;#039;&amp;#039;&amp;#039; For a series &amp;lt;math&amp;gt;\sum a_k&amp;lt;/math&amp;gt; with positive terms, if:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\lim_{k \to \infty} \left| \dfrac{a_{k+1}}{a_k} \right| = L&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the series converges absolutely if &amp;lt;math&amp;gt;L &amp;lt; 1&amp;lt;/math&amp;gt; and diverges if &amp;lt;math&amp;gt;L &amp;gt; 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Comparison Test:&amp;#039;&amp;#039;&amp;#039; If &amp;lt;math&amp;gt;0 \leq a_k \leq b_k&amp;lt;/math&amp;gt; for all sufficiently large &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\sum b_k&amp;lt;/math&amp;gt; converges, then &amp;lt;math&amp;gt;\sum a_k&amp;lt;/math&amp;gt; converges. Conversely, if &amp;lt;math&amp;gt;\sum a_k&amp;lt;/math&amp;gt; diverges, so does &amp;lt;math&amp;gt;\sum b_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Infinite Series for Algorithm Analysis===&lt;br /&gt;
&lt;br /&gt;
In Section 1.2.10, Knuth applies infinite series to analyze the performance of algorithms. A typical application involves bounding the running time of an algorithm by an infinite series that converges to a known value.&lt;br /&gt;
&lt;br /&gt;
For example, when analyzing the expected number of local maxima in a random permutation, Knuth encounters series that can be summed in closed form using the techniques developed in earlier sections.&lt;br /&gt;
&lt;br /&gt;
The key insight is that many algorithm analyses lead to sums of the form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k} \dfrac{1}{k}, \quad \sum_{k} \dfrac{1}{k^2}, \quad \sum_{k} \dfrac{k}{2^k}, \quad \sum_{k} \binom{n}{k} \dfrac{1}{2^k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all of which can be evaluated using the infinite series techniques described above.&lt;br /&gt;
&lt;br /&gt;
=Example Problems=&lt;br /&gt;
&lt;br /&gt;
==Knuth AOCP Section 1.2.7 Problem 1==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Problem 1.&amp;#039;&amp;#039;&amp;#039; (M00 difficulty) What is &amp;lt;math&amp;gt;H_0&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
By definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_n = \sum_{k=1}^{n} \dfrac{1}{k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The empty sum is zero, so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_0 = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Knuth AOCP Section 1.2.9 Exercise 1==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Exercise 1.&amp;#039;&amp;#039;&amp;#039; What is the generating function for &amp;lt;math&amp;gt;\langle 2^n + 3^n \rangle = \{ 2, 5, 13, 35, \dots \}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
The generating function for &amp;lt;math&amp;gt;2^n&amp;lt;/math&amp;gt; is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
G_{2^n}(z) = \sum_{k \geq 0} 2^k z^k = \dfrac{1}{1 - 2z}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The generating function for &amp;lt;math&amp;gt;3^n&amp;lt;/math&amp;gt; is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
G_{3^n}(z) = \dfrac{1}{1 - 3z}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the addition property of infinite series (and generating functions), the generating function for the sum is the sum of the generating functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
G(z) = \dfrac{1}{1-2z} + \dfrac{1}{1-3z} = \dfrac{2 - 5z}{1 - 5z + 6z^2}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The coefficient of &amp;lt;math&amp;gt;z^n&amp;lt;/math&amp;gt; in the Taylor expansion of &amp;lt;math&amp;gt;G(z)&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;2^n + 3^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Sum of Inverse Squares==&lt;br /&gt;
&lt;br /&gt;
The infinite series:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=1}^{\infty} \dfrac{1}{k^2} = 1 + \dfrac{1}{4} + \dfrac{1}{9} + \dfrac{1}{16} + \dots = \dfrac{\pi^2}{6}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the Basel problem, solved by Euler. While not covered extensively in Knuth&amp;#039;s Volume 1, this series is a classic example of a convergent series related to the harmonic series.&lt;br /&gt;
&lt;br /&gt;
Compare with the harmonic series (divergent):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=1}^{\infty} \dfrac{1}{k} \to \infty&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the series of inverse cubes (convergent, but no simple closed form):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{k=1}^{\infty} \dfrac{1}{k^3} = \zeta(3) \approx 1.2020569\dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Related=&lt;br /&gt;
&lt;br /&gt;
[[AOCP/Binomial Coefficients]] - the binomial theorem and binomial series&lt;br /&gt;
&lt;br /&gt;
[[AOCP/Fibonacci Numbers]] - generating function for Fibonacci numbers&lt;br /&gt;
&lt;br /&gt;
[[AOCP/Generating Functions]] - formal power series and operations&lt;br /&gt;
&lt;br /&gt;
[[AOCP/Harmonic Numbers]] - harmonic series and harmonic numbers&lt;br /&gt;
&lt;br /&gt;
[[AOCP/Power Series Manipulation]] - algorithms for manipulating power series (Volume 2)&lt;br /&gt;
&lt;br /&gt;
[[AOCP/Multinomial Coefficients]]&lt;br /&gt;
&lt;br /&gt;
[[Generating Functions]] - alternate coverage with additional examples&lt;br /&gt;
&lt;br /&gt;
[[Euler-Mascheroni Constant]] - the constant &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; related to harmonic series&lt;br /&gt;
&lt;br /&gt;
=Flags=&lt;br /&gt;
&lt;br /&gt;
{{AOCPFlag}}&lt;br /&gt;
{{AlgorithmsFlag}}&lt;br /&gt;
&lt;br /&gt;
[[Category:AOCP]]&lt;br /&gt;
[[Category:Algorithms]]&lt;br /&gt;
[[Category:Combinatorics]]&lt;br /&gt;
[[Category:Series]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>