brain

tamnd's digital brain — notes, problems, research

41641 notes

TAOCP 1.2.8 Exercise 32

The original argument fails for two independent reasons: a sign error in reducing Cassini’s identity and an invalid cancellation using a false coprimality claim.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 31

Start from Binet’s formula in a consistent and fully controlled way.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 28

Let $\hat{\phi} = \frac{1}{2}(1-\sqrt{5})$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 29

Let $F_1=1, F_2=1$, $F_3=2, F_4=3, F_5=5, F_6=8, F_7=13$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 30

Let F_n=\frac{\phi^n-\psi^n}{\sqrt5},\qquad \phi=\frac{1+\sqrt5}{2},\ \psi=\frac{1-\sqrt5}{2}=-\phi^{-1}.

taocpmathematicsalgorithmsvolume-1math-project
TAOCP 1.2.8 Exercise 24

Let $D_n$ denote the given $n \times n$ determinant.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.8 Exercise 26

From Exercise 25 with $n=p$, where $p$ is an odd prime, we have 2^p F_p = 2 \sum_{k\ \mathrm{odd}} \binom{p}{k} 5^{(k-1)/2}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 27

From Exercise 26, for any odd prime $p \ne 5$, F_p \equiv 5^{(p-1)/2} \pmod p.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 25

From Eq.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 20

Let S_n = \sum_{k=0}^{n} F_k.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 23

We restart from the definition and avoid splitting into $F_k$ and $F_{k-1}$, which is the source of the earlier error.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 22

Let M=\begin{pmatrix}1&1\\[2pt]1&0\end{pmatrix}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 21

Let S_n(x)=\sum_{k=0}^{n}F_k x^k.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 19

Let $\phi = \frac{1}{2}(1+\sqrt{5})$ as in equation (3).

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.8 Exercise 18

Using identity (6), for any positive integers $n$ and $m$, F_{n+m} = F_m F_{n+1} + F_{m-1}F_n.

taocpmathematicsalgorithmsvolume-1medium
TAOCP 1.2.8 Exercise 17

From identity (6) in Section 1.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 14

Let $F_n$ be the Fibonacci numbers: F_0=0,\quad F_1=1,\quad F_{n+2}=F_{n+1}+F_n.

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.8 Exercise 16

Let S_n=\sum_{k=0}^{n}\binom{n-k}{k}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 13

Let $a_0=r$, $a_1=s$, and $a_{n+2}=a_{n+1}+a_n$ for $n\ge 0$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 15

Let $A_n$ and $B_n$ be defined by A_n = a_n - F_n, \qquad B_n = b_n - F_n.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 10

From equation (14), F_n = \frac{1}{\sqrt{5}}(\phi^n - \hat{\phi}^n), \qquad \hat{\phi} = \frac{1}{2}(1-\sqrt{5}).

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.8 Exercise 9

The Fibonacci sequence is extended to all integers $n$ by the recurrence F_{n+2}=F_{n+1}+F_n for all integers $n$, together with the initial values $F_0=0$ and $F_1=1$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 11

We prove both identities by a direct induction using the Fibonacci recurrence, avoiding any manipulation that mixes the two sides prematurely.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 12

The issue in the previous submission is not the method but the validation: the reviewer’s claimed value $\mathcal{F}_5=11$ is incorrect.

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.8 Exercise 8

Define Fibonacci numbers for all integers $n$ by requiring F_{n+2}=F_{n+1}+F_n \quad \text{for all } n\in\mathbb{Z}, together with $F_0=0$, $F_1=1$.

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.8 Exercise 7

We use two standard facts about Fibonacci numbers.

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.8 Exercise 6

Let A=\begin{pmatrix}1 & 1 \\ 1 & 0\end{pmatrix}.

taocpmathematicsalgorithmsvolume-1hm-simple
TAOCP 1.2.8 Exercise 5

We use the standard initial values $F_0=0$, $F_1=1$, $F_2=1$, and the recurrence $F_{n+1}=F_n+F_{n-1}$ for $n\ge 1$.

taocpmathematicsalgorithmsvolume-1medium
TAOCP 1.2.8 Exercise 4

The Fibonacci numbers are defined by $F_1=1$, $F_2=1$, and $F_{n+2}=F_{n+1}+F_n$ for $n \ge 1$.

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.8 Exercise 3

The Fibonacci numbers satisfy the recurrence F_{n+1} = F_n + F_{n-1}, \qquad F_1 = 1,\; F_2 = 1.

taocpmathematicsalgorithmsvolume-1medium
TAOCP 1.2.7 Exercise 25

Let $H_n^{(u)}=\sum_{k=1}^{n}\frac{1}{k^u}$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.8 Exercise 1

Let $R_n$ be the number of rabbit pairs after $n$ months, starting with one newborn pair at month $0$, and assume each pair becomes productive after one month and then produces one new pair every mont...

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.8 Exercise 2

From equation (15), F_n = \frac{\phi^n}{\sqrt{5}} \text{ rounded to the nearest integer.

taocpmathematicsalgorithmsvolume-1medium
TAOCP 1.2.7 Exercise 24

Define the partial products P_n(x)=xe^{\gamma x}\prod_{k=1}^n\left(\left(1+\frac{x}{k}\right)e^{-x/k}\right).

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.7 Exercise 23

Let the digamma function be defined by \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.7 Exercise 22

The error identified in the review is genuine: the admissible region for $(i,j)$ was shifted from $i+j\le n$ to $i+j\le n+1$.

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.7 Exercise 21

Let S=\sum_{k=1}^{n}\frac{H_k}{n+1-k}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 20

Let $f(x)=\sum_{k\ge 0} a_k x^k$ converge at $x=x_0$.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.7 Exercise 16

Let S=\sum_{k=1}^{n}\frac{1}{2k-1}.

taocpmathematicsalgorithmsvolume-1medium
TAOCP 1.2.7 Exercise 18

Let S_n=\sum_{k=1}^n \frac{1}{2k-1}.

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.7 Exercise 17

Let $p$ be an odd prime and consider H_{p-1}=\sum_{k=1}^{p-1}\frac{1}{k}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 19

For $n \ge 0$, the harmonic number is defined by H_n = \sum_{k=1}^{n}\frac{1}{k}, with $H_0 = 0$ by the empty sum convention.

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.7 Exercise 13

Start with the binomial expansion x^k = (1+(x-1))^k = \sum_{j=0}^{k}\binom{k}{j}(x-1)^j.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 14

Let S=\sum_{k=1}^{n}\frac{H_k}{k}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 12

Let H_{\infty}^{(1000)}=\sum_{k=1}^{\infty}\frac{1}{k^{1000}}=1+R,\qquad R=\sum_{k=2}^{\infty}\frac{1}{k^{1000}}.

taocpmathematicsalgorithmsvolume-1math-simple
TAOCP 1.2.7 Exercise 15

Let S_n = \sum_{k=1}^{n} H_k^2.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 11

Let S=\sum_{1<k\le n}\frac{1}{k(k-1)}H_k =\sum_{k=2}^{n}\frac{1}{k(k-1)}H_k.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 9

Let S_n=\sum_{k=1}^{n}\binom{n}{k}(-1)^k H_k.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 10

Let S=\sum_{1\le k<n}(a_{k+1}-a_k)b_k.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 8

Define A_n=\sum_{k=1}^n H_k,\qquad B_n=\sum_{k=1}^n \ln k=\ln(n!

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.7 Exercise 6

Let $\left[{n \atop k}\right]$ denote the Stirling numbers of the first kind, defined by the recurrence \left[{n \atop k}\right] = (n-1)\left[{n-1 \atop k}\right] + \left[{n-1 \atop k-1}\right], with...

taocpmathematicsalgorithmsvolume-1math-simple
TAOCP 1.2.7 Exercise 4

The integral comparison gives \int_1^n \frac{dx}{x} < \sum_{k=1}^n \frac{1}{k} < 1 + \int_1^n \frac{dx}{x}, hence

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.7 Exercise 5

We restart the computation from the Euler–Maclaurin expansion and carry all arithmetic consistently to the required precision.

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.7 Exercise 7

Define T(m,n)=H_m+H_n-H_{mn}, \qquad m,n\in \mathbb{Z}_{>0}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 3

Let H_n^{(r)} = \sum_{k=1}^{n} \frac{1}{k^r}, \qquad r>1.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.7 Exercise 2

For $m \ge 0$, write H_{2^m} = \sum_{k=1}^{2^m} \frac{1}{k}.

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.7 Exercise 1

By definition of harmonic numbers, $H_n = \sum_{k=1}^{n} \frac{1}{k}$, with the convention that an empty sum equals $0$.

taocpmathematicsalgorithmsvolume-1simple
TAOCP 1.2.6 Exercise 65

The exercise assumes Eqs.

taocpmathematicsalgorithmsvolume-1hm-hard
TAOCP 1.2.6 Exercise 67

For $k = 0$, the binomial coefficient satisfies $\binom{n}{0} = 1$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 68

The earlier response failed because it replaced the task instead of proving the stated identity.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 66

Let f_k(r)=\binom{r}{k},\qquad r\ge k-1, for real $r$.

taocpmathematicsalgorithmsvolume-1hm-hard
TAOCP 1.2.6 Exercise 62

The previous argument failed because it repeatedly used coefficient manipulations that do not respect dependence on the summation index $k$, and it invoked an unproved alternating Vandermonde identity...

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 63

The original solution fails because it introduces an incorrect algebraic factorization and then builds a decoupling argument on it.

taocpmathematicsalgorithmsvolume-1math-hard
TAOCP 1.2.6 Exercise 64

Let $S(n,m)$ denote the number of ways to partition a set of $n$ elements into $m$ nonempty disjoint subsets.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 58

Let P_n(x)=\prod_{j=0}^{n-1}(1+q^j x), \qquad n\ge 0.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 59

The core issue is that the recurrence is valid only for $k \ge 1$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 61

The key failure is the incorrect “recognition step.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 60

Let the $n$ objects be labeled $1,2,\ldots,n$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 57

Let $f(n)=\ln(n!)$ and $\Delta f(n)=f(n+1)-f(n)$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 55

Let $S(n,k)$ denote Stirling numbers of the second kind and $s(n,k)$ denote Stirling numbers of the first kind in the signed form.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 54

Let $P = (p_{ij})_{i,j \ge 0}$ denote Pascal’s triangle matrix defined by p_{ij} = \begin{cases} \binom{i}{j}, & i \ge j,\\ 0, & i < j.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 56

For integers $a>b>c\ge 0$, define the representation n=\binom{a}{3}+\binom{b}{2}+\binom{c}{1}.

taocpmathematicsalgorithmsvolume-1medium
TAOCP 1.2.6 Exercise 52

Abel’s binomial formula (TAOCP 1.

taocpmathematicsalgorithmsvolume-1hm-simple
TAOCP 1.2.6 Exercise 53

Let S_m=\sum_{k=0}^{m}\binom{r}{k}\binom{s}{n-k}\bigl(nr-(r+s)k\bigr).

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 51

Let $z=x+y$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 50

Abel’s formula (Eq.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 49

From the binomial theorem (13), interpreted as formal power series in $x$, we have (1+x)^r = \sum_{n \ge 0} \binom{r}{n} x^n.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 47

Let $k \ge 0$ be an integer and $r$ an arbitrary parameter.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 48

Assume $x \notin {0,-1,-2,\ldots,-n}$ so that all denominators are nonzero.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 44

From the generalized binomial coefficient (Exercise 42), for real $r$ and real $k$ we use \binom{r}{k}=\frac{\Gamma(r+1)}{\Gamma(k+1)\Gamma(r-k+1)}.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.6 Exercise 43

From the definition of the beta function, B\!

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.6 Exercise 45

Let $k$ be a fixed integer with $k \ge 0$.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.6 Exercise 46

Stirling’s approximation (Eq.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 40

For $x>0$, B(x,1)=\int_0^1 t^{x-1}(1-t)^{0}\,dt=\int_0^1 t^{x-1}\,dt.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.6 Exercise 41

Let $x>0$ and $y>0$.

taocpmathematicsalgorithmsvolume-1hm-medium
TAOCP 1.2.6 Exercise 42

From the factorial representation (5), \binom{r}{k}=\frac{\Gamma(r+1)}{\Gamma(k+1)\Gamma(r-k+1)}.

taocpmathematicsalgorithmsvolume-1hm-simple
TAOCP 1.2.6 Exercise 38

Let $n,m,k$ be integers with $m \ge 1$.

taocpmathematicsalgorithmsvolume-1hm-hard
TAOCP 1.2.6 Exercise 39

The numbers $\left[{n \atop k}\right]$ count permutations of $n$ objects with exactly $k$ cycles.

taocpmathematicsalgorithmsvolume-1math-simple
TAOCP 1.2.6 Exercise 36

From the binomial theorem (13) with $x=1$, $y=1$, (1+1)^n=\sum_k \binom{n}{k}1^k1^{n-k}=\sum_k \binom{n}{k}, so

taocpmathematicsalgorithmsvolume-1math-simple
TAOCP 1.2.6 Exercise 37

Let S=\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots .

taocpmathematicsalgorithmsvolume-1math-simple
TAOCP 1.2.6 Exercise 34

Let R_n(x,y)=\sum_{k} \binom{n}{k}\,x\,(x-kz+1)^{\overline{k-1}}(y+kz)^{\overline{n-k}}.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 35

Let the Stirling numbers of the second kind $S(n,k)$ and the Stirling numbers of the first kind $s(n,k)$ be defined by Eqs.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 32

The stated identity is incorrect, so no proof of it can be completed as written.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 33

Proceed by induction on $n$.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 30

Let Example 3 define S=\sum_{k} \binom{r}{k}\binom{s}{m+k}, where the sum is over all integers $k$ for which the binomial coefficients are defined, i.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 29

Let Eq.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 31

Let A=m-r+s,\qquad B=n+r-s,\qquad M=m+n.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 25

The previous solution fails because it assumes, without proof, that the polynomials $A_k(r,t)$ coincide with the Taylor coefficients of $x^r$ in the variable $z=x^{t+1}-x^t$.

taocpmathematicsalgorithmsvolume-1hm-hard
TAOCP 1.2.6 Exercise 28

Let L_n(r,s,t)=\sum_{k\ge 0} \binom{r+tk}{k}\binom{s-tk}{n-k},\qquad R_n(r,s,t)=\sum_{k\ge 0} \binom{r+s-k}{n-k}t^k.

taocpmathematicsalgorithmsvolume-1math-medium
TAOCP 1.2.6 Exercise 27

The error in the previous solution is not in the Lagrange inversion part, but in the attempt to derive Eq.

taocpmathematicsalgorithmsvolume-1hm-medium