6.1 2314, 2431, 3241, 1342, 3124, 4132, 4213, 1423, 2143, 3412, 4321.

6.2 Image, because every such function partitions its domain into k nonempty subsets, and there are mk ways to assign function values for each partition. (Summing over k gives a combinatorial proof of (6.10).)

6.3 Now dk+1 (center of gravity) Image = 1 Image + (d1 + · · · + dk)/k. This recurrence is like (6.55) but with 1 Image in place of 1; hence the optimum solution is dk+1 = (1 Image)Hk. This is unbounded as long as Image < 1.

6.4 Image. (Similarly Image.)

6.5 Un(x, y) is equal to

Image

and the first sum is

Image

The remaining k1 can be absorbed, and we have

Image

This proves (6.75). Let Rn(x, y) = xnUn(x, y); then R0(x, y) = 0 and Rn(x, y) = Rn1(x, y)+1/n+y/x, hence Rn(x, y) = Hn+ny/x. (Incidentally, the original sum Un = Un(n, 1) doesn’t lead to a recurrence such as this; therefore the more general sum, which detaches x from its dependence on n, is easier to solve inductively than its special case. This is another instructive example where a strong induction hypothesis makes the difference between success and failure.)

The Fibonacci recurrence is additive, but the rabbits are multiplying.

6.6 Each pair of babies bb present at the end of a month becomes a pair of adults aa at the end of the next month; and each pair aa becomes an aa and a bb. Thus each bb behaves like a drone in the bee tree and each aa behaves like a queen, except that the bee tree goes backward in time while the rabbits are going forward. There are Fn+1 pairs of rabbits after n months; Fn of them are adults and Fn1 are babies. (This is the context in which Fibonacci originally introduced his numbers.)

6.7 (a) Set k = 1 n and apply (6.107). (b) Set m = 1 and k = n 1 and apply (6.128).

6.8 55 + 8 + 2 becomes 89 + 13 + 3 = 105; the true value is 104.60736.

That “true value” is the length of 65 international miles, but the international mile is actually only .999998 as big as a U. S. statute mile. There are exactly 6336 kilometers in 3937 U. S. statute miles; the Fibonacci method converts 3937 to 6370.

6.9 21. (We go from Fn to Fn+2 when the units are squared. The true answer is about 20.72.)

6.10 The partial quotients a0, a1, a2, . . . are all equal to 1, because ϕ = 1 + 1/ϕ. (The Stern–Brocot representation is therefore RLRLRLRLRL . . . .)

6.11 Image; see (6.11).

6.12 This is a consequence of (6.31) and its dual in Table 264.

6.13 The two formulas are equivalent, by exercise 12. We can use induction. Or we can observe that znDn applied to f(z) = zx gives xnzx while ϑn applied to the same function gives xnzx; therefore the sequence Imageϑ0, ϑ1, ϑ2, . . . Image must relate to Imagez0D0, z1D1, z2D2, . . . Image as Imagex0, x1, x2, . . . Image relates to Imagex0, x1, x2, . . . Image.

6.14 We have

Image

because (n + 1)x = (k + 1)(x + k n) + (n k)(x + k + 1). (It suffices to verify the latter identity when k = 0, k = 1, and k = n.)

6.15 Since Image, we have the general formula

Image

Set x = 0 and appeal to (6.19).

6.16 Image; this sum is always finite.

6.17 (a) Image (b) Image (c) Image

6.18 This is equivalent to (6.3) or (6.8).

6.19 Use Table 272.

6.20 Image

6.21 The hinted number is a sum of fractions with odd denominators, so it has the form a/b with b odd. (Incidentally, Bertrand’s postulate implies that bn is also divisible by at least one odd prime, whenever n > 2.)

6.22 |z/k(k + z)| ≤ 2|z|/k2 when k > 2|z|, so the sum is well defined when the denominators are not zero. If z = n we have Image, which approaches Hn as m . (The quantity Hz1 γ is often called the psi function ψ(z).)

6.23 z/(ez + 1) = z/(ez 1) 2z/(e2z 1) = n0(1 2n)Bnzn/n!.

6.24 When n is odd, Tn(x) is a polynomial in x2, hence its coefficients are multiplied by even numbers when we form the derivative and compute Tn+1(x) by (6.95). (In fact we can prove more: The Bernoulli number B2n always has 2 to the first power in its denominator, by exercise 54; hence 22nk \T2n+1 2k\(n + 1). The odd positive integers (n + 1)T2n+1/22n are called Genocchi numbers Image1, 1, 3, 17, 155, 2073, . . . Image, after Genocchi [145].)

(Of course Euler knew the Genocchi numbers long before Genocchi was born; see [110], Volume 2, Chapter 7, §181.)

6.25 100n nHn < 100(n 1) (n 1)Hn1 Hn1 > 99. (The least such n is approximately e99γ, while he finishes at Ne100γ, about e times as long. So he is getting closer during the final 63% of his journey.)

6.26 Let u(k) = Hk1 and Δv(k) = 1/k, so that u(k) = v(k). Then we have Image.

6.27 Observe that when m > n we have gcd(Fm, Fn) = gcd(Fmn, Fn) by (6.108). This yields a proof by induction.

6.28 (a) Qn = α(Ln Fn)/2 + βFn. (The solution can also be written Image.

6.29 When k = 0 the identity is (6.133). When k = 1 it is, essentially,

Image

in Morse code terms, the second product on the right subtracts out the cases where the first product has intersecting dashes. When k > 1, an induction on k suffices, using both (6.127) and (6.132). (The identity is also true when one or more of the subscripts on K become 1, if we adopt the convention that K1 = 0. When multiplication is not commutative, Euler’s identity remains valid for k = n 1 if we write it in the form

Image

For example, we obtain the somewhat surprising noncommutative factorizations

(abc + a + c)(1 + ba) = (ab + 1)(cba + a + c)

from the case m = 0, n = 3.)

6.30 The derivative of K(x1, . . . , xn) with respect to xm is

K(x1, . . . , xm1) K(xm+1, . . . , xn),

and the second derivative is zero; hence the answer is

K(x1, . . . , xn) + K(x1, . . . , xm1) K(xm+1, . . . , xn)y.

6.31 Since Image, we have Image. These coefficients, incidentally, satisfy the recurrence

Image

Image.

6.32 Image and Image, both of which appear in Table 265.

6.33 If n > 0, we have Image, by (6.71); Image, by (6.19).

6.34 We have Image; and in general Image is given by (6.38) for all integers n.

6.35 Let n be the least integer > 1/Image such that ImageHnImage > ImageHn1Image.

6.36 Now dk+1 = (100+(1+d1)+· · ·+(1+dk))/(100+k), and the solution is dk+1 = Hk+100 H101 + 1 for k 1. This exceeds 2 when k 176.

6.37 The sum (by parts) is Image. The infinite sum is therefore ln m. (It follows that

Image

because νm(k) = (m 1) j1(k mod mj)/mj.)

6.38 Image. (By parts, using (5.16).)

6.39 Write it as 1jn j1 jkn Hk and sum first on k via (6.67), to get

Image

6.40 If 6n 1 is prime, the numerator of

Image

is divisible by 6n 1, because the sum is

Image

Similarly if 6n + 1 is prime, the numerator of Image is a multiple of 6n + 1. For 1987 we sum up to k = 1324.

6.41 Image, hence we have Sn+1 + Image. The answer is Fn+2.

6.42 Fn.

6.43 Set Image in Σn≥0 Fnzn = z/(1 – z – z2) to get Image. The sum is a repeating decimal with period length 44:

0.11235 95505 61797 75280 89887 64044 94382 02247 19101 12359 55+.

6.44 Replace (m, k) by (–m, k) or (k, m) or (–k, m), if necessary, so that m k 0. The result is clear if m = k. If m > k, we can replace (m, k) by (m k, m) and use induction.

6.45 Xn = A(n)α+B(n)β+C(n)γ+D(n)δ, where B(n) = Fn, A(n) = Fn1, A(n) + B(n) D(n) = 1, and B(n) C(n) + 3D(n) = n.

6.46 ϕ/2 and ϕ1/2. Let u = cos 72° and v = cos 36°; then u = 2v2 1 and v = 12 sin2 18° = 12u2. Hence u+v = 2(u+v)(vu), and 4v22v1 = 0. We can pursue this investigation to find the five complex fifth roots of unity:

Image

“Let p be any old prime.”
(See [171], p. 419.)

6.47 Image, and the even powers of Image cancel out. Now let p be an odd prime. Then Image except when k = (p1)/2, and Image except when k = 0 or k = (p 1)/2; hence Fp5(p1)/2 and 2Fp+11 + 5(p1)/2 (mod p). It can be shown that 5(p1)/21 when p has the form 10k ± 1, and 5(p1)/21 when p has the form 10k ± 3.

6.48 Let Ki,j = Kji+1(xi, . . . , xj). Using (6.133) repeatedly, both sides expand to (K1,m2(xm1 + xm+1) + K1,m3)Km+2,n + K1,m2Km+3,n.

6.49 Set Image in (6.146); the partial quotients are 0, 2F0, 2F1, 2F2, . . .  . (Knuth [206] noted that this number is transcendental.)

6.50 (a) f(n) is even 3n. (b) If the binary representation of n is (1a1 0a2 . . . 1am1 0am )2, where m is even, we have f(n)=K(a1, a2, . . . , am1).

6.51 (a) Combinatorial proof: The arrangements of {1, 2, . . . , p} into k subsets or cycles are divided into “orbits” of 1 or p arrangements each, if we add 1 to each element modulo p. For example,

Image

We get an orbit of size 1 only when this transformation takes an arrangement into itself; but then k = 1 or k = p. Alternatively, there’s an algebraic proof: We have xpxp + x1 and xpxp x (mod p), since Fermat’s theorem tells us that xp x is divisible by (x 0)(x 1) . . . (x (p1)).

(b) This result follows from (a) and Wilson’s theorem; or we can use Image.

(c) We have Image for 3 k p, then Image for 4 k p, etc. (Similarly, we have Image.)

(d) Image. But Image, so

Image

is a multiple of p2. (This is called Wolstenholme’s theorem.)

(Attention, computer programmers: Here’s an interesting condition to test, for as many primes as you can.)

6.52 (a) Observe that Image, where Image. (b) Working mod 5 we have Hr = Image0, 1, 4, 1, 0Image for 0 r 4. Thus the first solution is n = 4. By part (a) we know that 5an 5aImagen/5Image; so the next possible range is n = 20 + r, 0 r 4, when we have Hn = Image. The numerator of Image, like the numerator of H4, is divisible by 25. Hence the only solutions in this range are n = 20 and n = 24. The next possible range is n = 100 + r; now Image, which is Image plus a fraction whose numerator is a multiple of 5. If Image, where m is an integer, the harmonic number H100+r will have a numerator divisible by 5 if and only if m + Hr0 (mod 5); hence m must be ≡ 0, 1, or 4. Working modulo 5 we find Image; hence there are no solutions for 100 n 104. Similarly there are none for 120 n 124; we have found all three solutions.

(By exercise 6.51(d), we always have p2ap1, pap2p, and pap21, if p is any prime 5. The argument just given shows that these are the only solutions to pan if and only if there are no solutions to p2Hp1 + Hr0 (mod p) for 0 r < p. The latter condition holds not only for p = 5 but also for p = 13, 17, 23, 41, and 67—perhaps for infinitely many primes. The numerator of Hn is divisible by 3 only when n = 2, 7, and 22; it is divisible by 7 only when n = 6, 42, 48, 295, 299, 337, 341, 2096, 2390, 14675, 16731, 16735, and 102728. See the answer to exercise 92.)

6.53 Summation by parts yields

Image

(The numerators of Bernoulli numbers played an important role in early studies of Fermat’s Last Theorem; see Ribenboim [308].)

6.54 (a) If m p we have Sm(p)Sm–(p1)(p) (mod p), since kp11 when 1 k < p. Also Sp1(p)p 11. If 0 < m < p 1, we can write

Image

(b) The condition in the hint implies that the denominator of I2n is not divisible by any prime p; hence I2n must be an integer. To prove the hint, we may assume that n>1. Then

Image

is an integer, by (6.78), (6.84), and part (a). So we want to verify that none of the fractions Image has a denominator divisible by p. The denominator of Image isn’t divisible by p, since Bk has no p2 in its denominator (by induction); and the denominator of p2nk1/(2n k + 1) isn’t divisible by p, since 2n k + 1 < p2nk when k 2n2; QED. (The numbers I2n are tabulated in [224]. Hermite calculated them through I18 in 1875 [184]. It turns out that I2 = I4 = I6 = I8 = I10 = I12 = 1; hence there is actually a “simple” pattern to the Bernoulli numbers displayed in the text, including Image. But the numbers I2n don’t seem to have any memorable features when 2n > 12. For example, Image, and 86579 is prime.)

(c) The numbers 21 and 31 always divide 2n. If n is prime, the only divisors of 2n are 1, 2, n, and 2n, so the denominator of B2n for prime n > 2 will be 6 unless 2n+1 is also prime. In the latter case we can try 4n+3, 8n+7, . . . , until we eventually hit a nonprime (since n divides 2n1n + 2n1 1). (This proof does not need the more difficult, but true, theorem that there are infinitely many primes of the form 6k + 1.) The denominator of B2n can be 6 also when n has nonprime values, such as 49.

6.55 The stated sum is Image, by Vandermonde’s convolution. To get (6.70), differentiate and set x = 0.

6.56 First replace kn+1 by ((k m) + m)n+1 and expand in powers of k m; simplifications occur as in the derivation of (6.72). If m > n or m < 0, the answer is Image. Otherwise we need to take the limit of (5.41) minus the term for k = m, as x m; the answer comes to Image.

6.57 First prove by induction that the nth row contains at most three distinct values An Bn Cn; if n is even they occur in the cyclic order [Cn, Bn, An, Bn, Cn], while if n is odd they occur in the cyclic order [Cn, Bn, An, An, Bn]. Also

A2n+1 = A2n + B2n ; A2n = 2A2n1 ;
B2n+1 = B2n + C2n ; B2n = A2n1 + B2n1 ;
C2n+1 = 2C2n ; C2n = B2n1 + B2n1 .

It follows that Qn = An Cn = Fn+1. (See exercise 5.75 for wraparound binomial coefficients of order 3.)

6.58 (a) Image. (Square Binet’s formula (6.123) and sum on n, then combine terms so that ϕ and Image disappear.) (b) Similarly,

Image

It follows that Image. (The corresponding recurrence for mth powers involves the Fibonomial coefficients of exercise 86; it was discovered by Jarden and Motzkin [194].)

6.59 Let m be fixed. We can prove by induction on n that it is, in fact, possible to find such an x with the additional condition x 2 (mod 4). If x is such a solution, we can move up to a solution modulo 3n+1 because

Image

either x or x + 8·3n1 or x + 16·3n1 will do the job.

6.60 F1 + 1, F2 + 1, F3 + 1, F4 1, and F6 1 are the only cases. Otherwise the Lucas numbers of exercise 28 arise in the factorizations

Image

(We have Fm+n (–1)nFmn = LmFn in general.)

6.61 1/F2m = Fm1/Fm F2m1/F2m when m is even and positive. The second sum is 5/4 F3·2n1/F3·2n, for n 1.

6.62 (a) Image and Image. Incidentally, we also have Image and Image. (b) A table of small values reveals that

Image

(c) Bn/An+1 Bn1/An = 1/(F2n+1 + 1) because Image and Image. Notice that Bn/An+1 = (Fn/Fn+1)[n even]+(Ln/Ln+1)[n odd]. (d) Similarly, Image. This quantity can also be expressed as (5Fn/Ln+1)[n even] + (Ln/Fn+1)[n odd].

6.63 (a) Image. There are Image with πn = n and Image with πn < n. (b) Image. Each permutation ρ1 . . . ρn1 of {1, . . . , n1} leads to n permutations π1π2 . . . πn = ρ1 . . . ρj1 n ρj+1 . . . ρn1ρj. If ρ1 . . . ρn1 has k excedances, there are k+1 values of j that yield k excedances in π1π2 . . . πn; the remaining n1k values yield k+1. Hence the total number of ways to get k excedances in π1π2 . . . πn is Image.

6.64 The denominator of Image, by the proof in exercise 5.72. The denominator of Image is the same, by (6.44), because Image and Image is even for k > 0.

6.65 This is equivalent to saying that Image is the probability that we have Imagex1 + · · · + xnImage = k, when x1, . . . , xn are independent random numbers uniformly distributed between 0 and 1. Let yj = (x1 + · · · + xj) mod 1. Then y1, . . . , yn are independently and uniformly distributed, and Imagex1 + · · · + xnImage is the number of descents in the y’s. The permutation of the y’s is random, and the probability of k descents is the same as the probability of k ascents.

6.66 2n+1(2n+1 1)Bn+1/(n + 1), if n > 0. (See (7.56) and (6.92); the desired numbers are essentially the coefficients of 1 tanh z.)

6.67 It is Image by (6.3) and (6.40). Now use (6.34). (This identity has a combinatorial interpretation [59].)

6.68 We have the general formula

Image

analogous to (6.38). When m = 2 this equals

Image

6.69 Image. (It would be nice to automate the derivation of formulas such as this.)

6.70 1/k 1/(k + z) = z/k2 z2/k3 + · · · , which converges when |z| < 1.

6.71 Note that Image. If Image we find f(z)/z! + γ = Hz.

6.72 For tan z, we can use tan z = cot z 2 cot 2z (which is equivalent to the identity of exercise 23). Also Image has the power series n0(–1)n1(4n 2)B2nz2n/(2n)!; and

Image

because Image and Image.

6.73 cot(z + π) = cot z and Image; hence the identity is equivalent to

Image

which follows by induction from the case n = 1. The stated limit follows since z cot z 1 as z 0. It can be shown that term-by-term passage to the limit is justified, hence (6.88) is valid. (Incidentally, the general formula

Image

is also true. It can be proved from (6.88), or from

Image

which is equivalent to the partial fraction expansion of 1/(zn 1).)

6.74 Since tan 2z + sec 2z = (sin z + cos z)/(cos z sin z), setting x = 1 in (6.94) gives Tn(1) = 2nEn, where 1/cos z = n0 E2nz2n/(2n)!. (The coefficients En are called Euler numbers in combinatorics, not to be confused with the Eulerian numbers Image. We have ImageE0, E1, E2, . . . Image = Image1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, . . . Image. Numerical analysts define Euler numbers differently: Their En is (–1)n/2En[n even] in the notation above.)

6.75 Let G(w, z) = sin z/ cos(w+z) and H(w, z) = cos z/ cos(w+z), and let G(w, z) + H(w, z) = m,n Em,nwmzn/m! n!. Then the equations G(w, 0) = 0 and Image imply that Em,0 = 0 when m is odd, Em,n+1 = Em+1,n + Em,n when m + n is even; the equations H(0, z) = 1 and Image imply that E0,n = [n = 0] when n is even, Em+1,n = Em,n+1+Em,n when m+n is odd. Consequently the nth row below the apex of the triangle contains the numbers En,0, En1,1, . . . , E0,n. At the left, En,0 is the secant number En [n even]; at the right, E0,n = Tn + [n = 0].

6.76 Let An denote the sum. Looking ahead to equation (7.49), we see that Image. Therefore, by exercise 23 or 72,

An = (2n+1 4n+1)Bn+1/(n + 1) = (–1)(n+1)/2Tn + [n = 0].

6.77 This follows by induction on m, using the recurrence in exercise 18. It can also be proved from (6.50), using the fact that

Image

The latter equation, incidentally, is equivalent to

Image

6.78 If p(x) is any polynomial of degree n, we have

Image

because this equation holds for x = 0, 1, . . . , n. The stated identity is the special case where p(x) = n(x) and x = 1. Incidentally, we obtain a simpler expression for Bernoulli numbers in terms of Stirling numbers by setting k = 1 in (6.99):

Image

6.79 Sam Loyd [256, pages 288 and 378] gave the construction

Image

and claimed to have invented (but not published) the 64 = 65 arrangement in 1858. (Similar paradoxes go back at least to the eighteenth century, but Loyd found better ways to present them.)

He also published it in the Brooklyn Daily Eagle (28 August 1904), 39; (11 September 1904), 37.

6.80 We expect Am/Am1ϕ, so we try Am1 = 618034 + r and Am2 = 381966r. Then Am3 = 236068+2r, etc., and we find Am18 = 1442584r, Am19 = 154 + 4181r. Hence r = 0, x = 154, y = 144, m = 20.

6.81 If P(Fn+1, Fn) = 0 for infinitely many even values of n, then P(x, y) is divisible by U(x, y) 1, where U(x, y) = x2 xy y2. For if t is the total degree of P, we can write

Image

Then

Image

and we have Image by taking the limit as n . Hence Q(x, y) is a multiple of U(x, y), say A(x, y)U(x, y). But U(Fn+1, Fn) = (–1)n and n is even, so P0(x, y) = P(x, y) (U(x, y) 1)A(x, y) is another polynomial such that P0(Fn+1, Fn) = 0. The total degree of P0 is less than t, so P0 is a multiple of U 1 by induction on t.

Similarly, P(x, y) is divisible by U(x, y) + 1 if P(Fn+1, Fn) = 0 for infinitely many odd values of n. A combination of these two facts gives the desired necessary and sufficient condition: P(x, y) is divisible by U(x, y)2 1.

6.82 First add the digits without carrying, getting digits 0, 1, and 2. Then use the two carry rules

Image

always applying the leftmost applicable carry. This process terminates because the binary value obtained by reading (bm . . . b2)F as (bm . . . b2)2 increases whenever a carry is performed. But a carry might propagate to the right of the “Fibonacci point”; for example, (1)F +(1)F becomes (10.01)F. Such rightward propagation extends at most two positions; and those two digit positions can be zeroed again by using the text’s “add 1” algorithm if necessary.

Incidentally, there’s a corresponding “multiplication” operation on nonnegative integers: If m = Fj1 +· · ·+Fjq and n = Fk1 +· · ·+Fkr in the Fibonacci number system, let Image, by analogy with multiplication of binary numbers. (This definition implies that Image when m and n are large, although 1 ο nϕ2n.) Fibonacci addition leads to a proof of the associative law l ο (m ο n) = (l ο m) ο n.

Exercise: m ο n = mn + Image(m+1)Imagen + m Image(n+1)Image.

6.83 Yes; for example, we can take

A0 =   331635635998274737472200656430763 ;
A1 = 1510028911088401971189590305498785 .

The resulting sequence has the property that An is divisible by (but unequal to) pk when n mod mk = rk, where the numbers (pk, mk, rk) have the following 18 respective values:

(3, 4, 1)   (2, 3, 2)   (5, 5, 1)
(7, 8, 3)   (17, 9, 4)   (11, 10, 2)
(47, 16, 7)   (19, 18, 10)   (61, 15, 3)
(2207, 32, 15)   (53, 27, 16)   (31, 30, 24)
(1087, 64, 31)   (109, 27, 7)   (41, 20, 10)
(4481, 64, 63)   (5779, 54, 52)   (2521, 60, 60)

One of these triples applies to every integer n; for example, the six triples in the first column cover every odd value of n, and the middle column covers all even n that are not divisible by 6. The remainder of the proof is based on the fact that Am+n = AmFn1 + Am+1Fn, together with the congruences

A0Fmkrk mod pk ,

A1Fmkrk+1 mod pk ,

for each of the triples (pk, mk, rk). (An improved solution, in which A0 and A1 are numbers of “only” 17 digits each, is also possible [218].)

6.84 The sequences of exercise 62 satisfy Am = Am, Bm = Bm, and

AmAn = Am+n + Amn ;

AmBn = Bm+n Bmn ;

BmBn = Am+n Amn .

Let fk = Bmk/Amk+l and gk = Amk/Bmk+l, where Image. Then fk+1 fk = AlBm/(A2mk+n + Am) and gk gk+1 = AlBm/(A2mk+n Am); hence we have

Image

6.85 The property holds if and only if N has one of the seven forms 5k, 2·5k, 4·5k, 3j·5k, 6·5k, 7·5k, 14·5k.

6.86 For any positive integer m, let r(m) be the smallest index j such that Cj is divisible by m; if no such j exists, let r(m) = . Then Cn is divisible by m if and only if gcd(Cn, Cr(m)) is divisible by m if and only if Cgcd(n,r(m)) is divisible by m if and only if gcd(n, r(m)) = r(m) if and only if n is divisible by r(m).

(Conversely, the gcd condition is easily seen to be implied by the condition that the sequence C1, C2, . . . has a function r(m), possibly infinite, such that Cn is divisible by m if and only if n is divisible by r(m).)

Now let Π(n) = C1C2 . . . Cn, so that

Image

If p is prime, the number of times p divides Π(n) is fp(n) = k1 Imagen/r(pk)Image, since Imagen/pkImage is the number of elements {C1, . . . , Cn} that are divisible by pk. Therefore fp(m + n) fp(m) + fp(n) for all p, and Image is an integer.

6.87 The matrix product is

Image

This relates to products of L and R as in (6.137), because we have

Image

The determinant is Kn(x1, . . . , xn); the more general tridiagonal determinant

Image

satisfies the recurrence Dn = xnDn1 ynDn2.

6.88 Let α1 = a0 + 1/(a1 + 1/(a2 + · · · )) be the continued fraction representation of α1. Then we have

Image

where

Image

A proof analogous to the text’s proof of (6.146) uses a generalization of Zeckendorf’s theorem (Fraenkel [129, §4]). If z = 1/b, where b is an integer 2, this gives the continued fraction representation of the transcendental number (b 1) n1 bImageImage, as in exercise 49.

6.89 Let p = K(0, a1, a2, . . . , am), so that p/n is the mth convergent to the continued fraction. Then α = p/n + (–1)m/nq, where q = K(a1, . . . , am, β) and β > 1. The points {} for 0 k < n can therefore be written

Image

where π1 . . . πn1 is a permutation of {1, . . . , n 1}. Let f(v) be the number of such points < v; then f(v) and vn both increase by 1 when v increases from k/n to (k + 1)/n, except when k = 0 or k = n 1, so they never differ by 2 or more.

6.90 By (6.139) and (6.136), we want to maximize K(a1, . . . , am) over all sequences of positive integers whose sum is n + 1. The maximum occurs when all the a’s are 1, for if j 1 and a 1 we have

Kj+k+1(1, . . . , 1, a + 1, b1, . . . , bk)
= Kj+k+1(1, . . . , 1, a, b1, . . . , bk) + Kj(1, . . . , 1) Kk(b1, . . . , bk)
Kj+k+1(1, . . . , 1, a, b1, . . . , bk) + Kj+k(1, . . . , 1, a, b1, . . . , bk)
= Kj+k+2(1, . . . , 1, a, b1, . . . , bk).

(Motzkin and Straus [278] show how to solve more general maximization problems on continuants.)

6.91 A candidate for the case n mod Image appears in [213, §6], although it may be best to multiply the integers discussed there by some constant involving Image. An elegant and more convincing proposal has been put forward by Philippe Flajolet and Helmut Prodinger in SIAM Journal on Discrete Mathematics 12 (1999), 155–159.

6.92 (a) David Boyd has shown that there are only finitely many solutions for all p < 500, except perhaps p = 83, 127, 397. (b) The behavior of bn is quite strange: We have bn = lcm(1, . . . , n) for 968 n 1066; on the other hand, b600 = lcm(1, . . . , 600)/(33 · 52 · 43). Andrew Odlyzko observes that p divides lcm(1, . . . , n)/bn if and only if kpm n < (k + 1)pm for some m 1 and some k < p such that p divides the numerator of Hk. Therefore infinitely many such n exist if it can be shown, for example, that almost all primes have only one such value of k (namely k = p 1).

Another reason to remember 1066?

6.93 (Brent [38] found the surprisingly large partial quotient 1568705 in eγ, but this seems to be just a coincidence. For example, Gosper has found even larger partial quotients in π: The 453,294th is 12996958 and the 11,504,931st is 878783625.)

6.94 Consider the generating function Image, which equals k (wF(α′ + β′ + γ′, α′ + β′, α′) + zF(α + γ, α + β, α))k(1), where F(a, b, c) is the differential operator a + w + z.

6.95 An elegant solution to this research problem has been found by Manuel Kauers, Journal of Symbolic Computation 42 (2007), 948–970.

Kauers succeeded even though Stirling numbers are not “holonomic” in the sense of [383].

7.1 Substitute z4 for Image and z for Image in the generating function, getting 1/(1 z4 z2). This is like the generating function for T, but with z replaced by z2. Therefore the answer is zero if m is odd, otherwise Fm/2+1.

7.2 G(z) = 1/(1 2z) + 1/(1 3z); Ĝ(z) = e2z + e3z.

7.3 Set z = 1/10 in the generating function, getting Image ln Image.

7.4 Divide P(z) by Q(z), getting a quotient T(z) and a remainder P0(z) whose degree is less than the degree of Q. The coefficients of T(z) must be added to the coefficients [zn] P0(z)/Q(z) for small n. (This is the polynomial T(z) in (7.28).)

7.5 This is the convolution of (1 + z2)r with (1 + z)r, so

S(z) = (1 + z + z2 + z3)r.

Incidentally, no simple form is known for the coefficients of this generating function; hence the stated sum probably has no simple closed form. (We can use generating functions to obtain negative results as well as positive ones.)

7.6 Let the solution to g0 = α, g1 = β, gn = gn1 + 2gn2 + (–1)nγ be gn = A(n)α + B(n)β + C(n)γ. The function 2n works when α = 1, β = 2, γ = 0; the function (–1)n works when α = 1, β = 1, γ = 0; the function (–1)nn works when α = 0, β = 1, γ = 3. Hence A(n) + 2B(n) = 2n, A(n) B(n) = (–1)n, and B(n) + 3C(n) = (–1)nn.

7.7 G(z) = (z/(1 z)2)G(z) + 1, hence

Image

we have gn = F2n + [n = 0].

I bet that the controversial “fan of order zero” does have one spanning tree.

7.8 Differentiate (1 z)x1 twice with respect to x, obtaining

Image

Now set x = m.

7.9 Image

7.10 The identity Image implies that Image.

7.11 (a) C(z) = A(z)B(z2)/(1 z). (b) zB′(z) = A(2z)ez, hence Image. (c) A(z) = B(z)/(1 z)r+1, hence B(z) = (1 z)r+1A(z) and we have Image.

7.12 Cn. The numbers in the upper row correspond to the positions of +1’s in a sequence of +1’s and 1’s that defines a “mountain range”; the numbers in the lower row correspond to the positions of 1’s. For example, the given array corresponds to

Image

7.13 Extend the sequence periodically (let xm+k = xk) and define sn = x1 + · · · + xn. We have sm = l, s2m = 2l, etc. There must be a largest index kj such that skj = j, skj+m = l + j, etc. These indices k1, . . . , kl (mod m) specify the cyclic shifts in question.

For example, in the sequence Image2, 1, 1, 0, 1, 1, 1, 1, 1, 1Image with m = 10 and l = 2 we have k1 = 17, k2 = 24.

7.14 Ĝ(z) = 2zĜ(z) + Ĝ(z)2 + z (be careful about the final term!) leads via the quadratic formula to

Image

Hence g2n+1 = 0 and g2n = (–1)n(2n)! Cn1, for all n > 0.

7.15 There are Image partitions with k other objects in the subset containing n+1. Hence Image. The solution to this differential equation is Image, and c = 1 since Image. (We can also get this result by summing (7.49) on m, since Image.)

7.16 One way is to take the logarithm of

B(z) = 1/((1 z)a1 (1 z2)a2 (1 z3)a3 (1 z4)a4 . . .),

then use the formula for ln Image and interchange the order of summation.

7.17 This follows since Image. There’s also a formula that goes in the other direction:

Image

7.18 (a) Image (b) ζ′(z); (c) ζ(z)(2z). Every positive integer is uniquely representable as m2q, where q is squarefree.

7.19 If n > 0, the coefficient [zn] exp(x ln F(z)) is a polynomial of degree n in x that’s a multiple of x. The first convolution formula comes from equating coefficients of zn in F(z)xF(z)y = F(z)x+y. The second comes from equating coefficients of zn1 in F′(z)F(z)x1F(z)y = F′(z)F(z)x+y1, because we have

Image

(Further convolutions follow by taking ∂/∂x, as in (7.43).)

Still more is true, as shown in [221]: We have

Image

for arbitrary x, y, and t. In fact, xfn(x + tn)/(x + tn) is the sequence of polynomials for the coefficients of Ft(z)x, where

Ft(z) = F(zFt(z)t) .

(We saw special cases in (5.59) and (6.52).)

7.20 Let G(z) = n0 gnzn. Then

Image

for all k, l 0, if we regard gn = 0 for n < 0. Hence if P0(z), . . . , Pm(z) are polynomials, not all zero, having maximum degree d, then there are polynomials p0(n), . . . , pm+d(n) such that

Image

Therefore a differentiably finite G(z) implies that

Image

The converse is similar. (One consequence is that G(z) is differentiably finite if and only if the corresponding egf, Ĝ(z), is differentiably finite.)

7.21 This is the problem of giving change with denominations 10 and 20, so G(z) = 1/(1 z10)(1 z20) = Image(z10), where Image(z) = 1/(1 z)(1 z2). (a) The partial fraction decomposition of Image(z) is Image, so Image. Setting n = 50 yields 26 ways to make the payment. (b) Image(z) = (1 + z)/(1 z2)2 = (1 + z)(1 + 2z2 + 3z4 + · · · ), so [zn] Image(z) = Imagen/2Image + 1. (Compare this with the value Nn = Imagen/5Image + 1 in the text’s coin-changing problem. The bank robber’s problem is equivalent to the problem of making change with pennies and tuppences.)

This slow method of finding the answer is just the cashier’s way of stalling until the police come.

The USA has two-cent pieces, but they haven’t been minted since 1873.

7.22 Each polygon has a “base” (the line segment at the bottom). If A and B are triangulated polygons, let AImageB be the result of pasting the base of A to the upper left diagonal of Image, and pasting the base of B to the upper right diagonal. Thus, for example,

Image

(The polygons might need to be warped a bit and/or banged into shape.) Every triangulation arises in this way, because the base line is part of a unique triangle and there are triangulated polygons A and B at its left and right.

Replacing each triangle by z gives a power series in which the coefficient of zn is the number of triangulations with n triangles, namely the number of ways to decompose an (n + 2)-gon into triangles. Since P = 1 + zP2, this is the generating function for Catalan numbers C0 + C1z + C2z2 + · · · ; the number of ways to triangulate an n-gon is Image.

7.23 Let an be the stated number, and bn the number of ways with a 2×1×1 notch missing at the top. By considering the possible patterns visible on the top surface, we have

an = 2an1 + 4bn1 + an2 + [n = 0] ;
bn = an1 + bn1 .

Hence the generating functions satisfy A = 2zA + 4zB + z2A + 1, B = zA + zB, and we have

Image

This formula relates to the problem of 3 × n domino tilings; we have an = Image, which is Image rounded to the nearest integer.

“Curiously, a2n is equal to Image, the square of the number of ways to tile a 3 × 2n rectangle with dominoes; and Image.”

—I. Kaplansky

7.24 nk1+···+km=n k1 · . . . · km/m = F2n+1 + F2n1 2. (Consider the coefficient Image, where G(z) = z/(1 z)2.)

7.25 The generating function is P(z)/(1 zm), where P(z) = z + 2z2 + · · · + (m 1)zm1 = ((m 1)zm+1 mzm + z)/(1 z)2. The denominator is Q(z) = 1 zm = (1 ω0z)(1 ω1z) . . . (1 ωm1z). By the rational expansion theorem for distinct roots, we obtain

Image

7.26 Image leads to Image as in equation (7.61).

7.27 Each oriented cycle pattern begins with Image or Image or a 2 × k cycle (for some k 2) oriented in one of two ways. Hence

Qn = Qn1 + Qn2 + 2Qn2 + 2Qn3 + · · · + 2Q0

for n 2; Q0 = Q1 = 1. The generating function is therefore

Image

and Image.

7.28 In general if A(z) = (1 + z + · · · + zm1)B(z), we have Ar + Ar+m + Ar+2m + · · · = B(1) for 0 r < m. In this case m = 10 and B(z) = (1 + z + · · · + z9)(1 + z2 + z4 + z6 + z8)(1 + z5).

7.29 Image, so the answer is Image.

7.30 Image, by exercise 5.39.

7.31 The dgf is ζ(z)2(z1); hence we find g(n) is the product of (k+1kp) over all prime powers pk that exactly divide n.

7.32 We may assume that each bk 0. A set of arithmetic progressions forms an exact cover if and only if

Image

Subtract zbm/(1 zam) from both sides and set z = e2πi/am. The left side is infinite, and the right side will be finite unless am1 = am.

7.33 (–1)nm+1[n > m]/(n m).

7.34 We can also write Image. In general, if

Image

we have Gn = z1Gn1 + z2Gn2 + · · · + zrGnr + [n = 0], and the generating function is 1/(1 z1w z2w2 · · · zrwr). In the stated special case the answer is 1/(1 w zmwm+1). (See (5.74) for the case m = 1.)

7.35 (a) Image. (b) Image by (7.50) and (6.58). Another way to do part (b) is to use the rule Image with Image.

7.36 Image

7.37 (a) The amazing identity a2n = a2n+1 = bn holds in the table

Image

(b) A(z) = 1/((1 z)(1 z2)(1 z4)(1 z8) . . .). (c) B(z) = A(z)/(1 z), and we want to show that A(z) = (1 + z)B(z2). This follows from A(z) = A(z2)/(1 z).

7.38 (1 wz)M(w, z) = m,n1(min(m, n) min(m1, n1))wmzn = m,n1 wmzn = wz/(1 w)(1 z). In general,

Image

7.39 The answers to the hint are

Image

respectively. Therefore: (a) We want the coefficient of zm in the product (1 + z)(1 + 2z) . . . (1 + nz). This is the reflection of Image, so it is Image and the answer is Image. (b) The coefficient of zm in 1/((1 z)(1 2z)...(1 nz)) is Image by (7.47).

7.40 The egf for ImagenFn1 FnImage is Image where Image. The egf for Imagen¡Image is ez/(1 z). The product is

Image

We have Image. So the answer is (–1)nFn.

7.41 The number of up-down permutations with the largest element n in position 2k is Image. Similarly, the number of up-down permutations with the smallest element 1 in position 2k + 1 is Image, because down-up permutations and up-down permutations are equally numerous. Summing over all possibilities gives

Image

The egf  therefore satisfies 2Â(z) = Â(z)2 +1 and Â(0) = 1; the given function solves this differential equation. (Consequently An is the Euler number En of exercise 6.74, namely a secant number when n is even, a tangent number when n is odd.)

7.42 Let an be the number of Martian DNA strings that don’t end with c or e; let bn be the number that do. Then

Image

and the total number is [zn](1 + z)/(1 4z z2) = F3n+2.

7.43 By (5.45), gn = ΔnĠ(0). The nth difference of a product can be written

Image

and Image. Therefore we find

Image

This is a sum over all trinomial coefficients; it can be put into the more symmetric form

Image

The empty set is pointless.

7.44 Each partition into k nonempty subsets can be ordered in k! ways, so bk = k!. Thus Image. And this is the geometric series k0 ekz/2k+1, hence ak = 1/2k+1. Finally, ck = 2k; consider all permutations when the x’s are distinct, change each ‘>’ between subscripts to ‘<’ and allow each ‘<’ between subscripts to become either ‘<’ or ‘=’. (For example, the permutation x1x3x2 produces x1 < x3 < x2 and x1 = x3 < x2, because 1 < 3 > 2.)

7.45 This sum is n1 r(n)/n2, where r(n) is the number of ways to write n as a product of two relatively prime factors. If n is divisible by t distinct primes, r(n) = 2t. Hence r(n)/n2 is multiplicative and the sum is

Image

7.46 Let Image. Then Sn = Sn1 + αSn3 + [n = 0], and the generating function is 1/(1 z αz3). When Image, the hint tells us that this has a nice factorization Image. The general expansion theorem now tells us that Image, and the remaining constant c turns out to be Image.

7.47 The Stern–Brocot representation of Image is R(LR2), because

Image

The fractions are Image ; they eventually have the cyclic pattern

Image

7.48 We have g0 = 0, and if g1 = m the generating function satisfies

Image

Hence G(z) = P(z)/(az2 + bz + c)(1 z) for some polynomial P(z). Let ρ1 and ρ2 be the roots of cz2 + bz + a, with |ρ1| |ρ2|. If b2 4ac 0 then |ρ1|2 = ρ1ρ2 = a/c is rational, contradicting the fact that Image approaches Image. Hence Image; and this implies that a = –c, b = –2c, Image. The generating function now takes the form

Image

where r = d/c. Since g2 is an integer, r is an integer. We also have

Image

and this can hold only if r = 1, because Image alternates in sign as it approaches zero. Hence (a, b, c, d) = ±(1, 2, 1, 1). Now we find Image, which is between 0 and 1 only if 0 m 2. Each of these values actually gives a solution; the sequences ImagegnImage are Image0, 0, 1, 3, 8, . . . Image, Image0, 1, 3, 8, 20, . . . Image, and Image0, 2, 5, 13, 32, . . . Image.

7.49 (a) The denominator of Image is 1 2z z2; hence an = 2an1 + an2 for n 2. (b) True because an is even and Image. (c) Let

Image

We would like bn to be odd for all n > 0, and Image. Working as in part (a), we find b0 = 2, b1 = p, and Image for n 2. One satisfactory solution has p = 3 and q = 17.

7.50 Extending the multiplication idea of exercise 22, we have

Image

Replace each n-gon by zn2. This substitution behaves properly under multiplication, because the pasting operation takes an m-gon and an n-gon into an (m + n 2)-gon. Thus the generating function is

Image

and the quadratic formula gives Image. The coefficient of zn2 in this power series is the number of ways to put nonoverlapping diagonals into a convex n-gon. These coefficients apparently have no closed form in terms of other quantities that we have discussed in this book, but their asymptotic behavior is known [207, exercise 2.2.1–12].

Incidentally, if each n-gon in Q is replaced by wzn2 we get

Image

a formula in which the coefficient of wmzn2 is the number of ways to divide an n-gon into m polygons by nonintersecting diagonals.

Give me Legendre polynomials and I’ll give you a closed form.

7.51 The key first step is to observe that the square of the number of ways is the number of cycle patterns of a certain kind, generalizing exercise 27. These can be enumerated by evaluating the determinant of a matrix whose eigenvalues are not difficult to determine. When m = 3 and n = 4, the fact that cos 36° = ϕ/2 is helpful (exercise 6.46).

7.52 The first few cases are p0(y) = 1, p1(y) = y, p2(y) = y2 + y, p3(y) = y3 + 3y2 + 3y. Let pn(y) = q2n(x) where y = x(1 x); we seek a generating function that defines q2n+1(x) in a convenient way. One such function is n qn(x)zn/n! = 2eixz/(eiz + 1), from which it follows that qn(x) = inEn(x), where En(x) is called an Euler polynomial. We have Image, so Euler polynomials are analogous to Bernoulli polynomials, and they have factors analogous to those in (6.98). By exercise 6.23 we have Image; this polynomial has integer coefficients by exercise 6.54. Hence q2n(x), whose coefficients have denominators that are powers of 2, must have integer coefficients. Hence pn(y) has integer coefficients. Finally, the relation Image shows that

Image

and it follows that the Image’s are positive. (A similar proof shows that the related quantity (–1)n(2n + 2)E2n+1(x)/(2x 1) has positive integer coefficients, when expressed as an nth degree polynomial in y.) It can be shown that Image is the Genocchi number (–1)n1(22n+1 2)B2n (see exercise 6.24), and that Image, etc.

7.53 It is P(1+V4n+1+V4n+3)/6. Thus, for example, T20 = P12 = 210; T285 = P165 = 40755.

7.54 Let Ek be the operation on power series that sets all coefficients to zero except those of zn where n mod m = k. The stated construction is equivalent to the operation

E0 S E0 S (E0 + E1) S ... S (E0 + E1 + · · · + Em1)

applied to 1/(1 z), where S means “multiply by 1/(1 z).” There are m! terms

E0 S Ek1 S Ek2 S ... S Ekm

where 0 kj < j, and every such term evaluates to zrm/(1 zm)m+1 if r is the number of places where kj < kj+1. Exactly Image terms have a given value of r, so the coefficient of zmn is Image by (6.37). (The fact that operation Ek can be expressed with complex roots of unity seems to be of no help in this problem.)

7.55 Suppose that P0(z)F(z) + · · · + Pm(z)F(m)(z) = Q0(z)G(z) + · · · + Qn(z)G(n)(z) = 0, where Pm(z) and Qn(z) are nonzero. (a) Let H(z) = F(z) + G(z). Then there are rational functions Rk,l(z) for 0 l < m + n such that H(k)(z) = Rk,0(z)F(0)(z) + · · · + Rk,m1(z)F(m1)(z) + Rk,m(z)G(0)(z) + · · · + Rk,m+n1(z)G(n1)(z). The m + n + 1 vectors (Rk,0(z), . . . , Rk,m+n1(z)) are linearly dependent in the (m + n)-dimensional vector space whose components are rational functions; hence there are rational functions Sl(z), not all zero, such that S0(z)H(0)(z) + · · · + Sm+n(z)H(m+n)(z) = 0. (b) Similarly, let H(z) = F(z)G(z). There are rational Rk,l(z) for 0 l < mn with Image, hence S0(z)H(0)(z) + · · · + Smn(z)H(mn)(z) = 0 for some rational Sl(z), not all zero. (A similar proof shows that if ImagefnImage and ImagegnImage are polynomially recursive, so are Imagefn + gnImage and ImagefngnImage. Incidentally, there is no similar result for quotients; for example, cos z is differentiably finite, but 1/cos z is not.)

7.56 Euler [113] showed that this number is also Image, and he gave the formula Image. He also discovered a “memorable failure of induction” while examining these numbers: Although 3tn tn+1 is equal to Fn1(Fn1 + 1) for 0 n 8, this empirical law mysteriously breaks down when n is 9 or more! George Andrews [12] has explained the mystery by showing that the sum k[zn+10k] (1 + z + z2)n can be expressed as a closed form in terms of Fibonacci numbers.

H. S. Wilf observes that [zn] (a + bz + cz2)n= [zn] 1/f(z), where Image (see [373, page 159]), and it follows that the coefficients satisfy

(n + 1)An+1 (2n + 1)bAn + n(b2 4ac)An1 = 0.

The algorithm of Petkovšek [291] can be used to prove that this recurrence has a closed form solution as a finite sum of hypergeometric terms if and only if abc(b2 4ac) = 0. Therefore in particular, the middle trinomial coefficients have no such closed form. The next step is presumably to extend this result to a larger class of closed forms (including harmonic numbers and/or Stirling numbers, for example).

Give me Legendre polynomials and I’ll give you a closed form.

7.57 (Paul Erdős repeatedly offered $500 for a solution to this problem.)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.107.191