4.5.3 ANSWERS TO EXERCISES 607 [The sequence of (Web site template)
Friday, November 16th, 20074.5.3 ANSWERS TO EXERCISES 607 [The sequence of labels on successive levels of this tree was first studied by M. A. Stern, J. fiir die reine und Angew. Math. 55 (1858), 193-220, although the relation to binary trees is not explicit in his paper. Peirce independently communicated this construction in a letter dated July 17, 1903, but he never published it; and during the next few years he occasionally amused himself by making rather cryptic remarks about it without revealing the underlying mechanism. See C. S. Peirce, The New Elements of Mathematics 3 (The Hague: Mouton, 1976), 781-784, 826-829; also 1, 207-211; and his Collected Papers 4 (1933), 276-280. See also D. H. Lehmer, AM&4 36 (1929), 59-67.1 41. In fact, the regular continued fractions for numbers of the general form (-l)e ;+l,+$g 123 +… have an interesting pattern, based on the continuant identity Qm+n+1 (Xl,…, G-l,% -l,l,ym -l,ym-1,…,y1)= xnQn–1(x1,. . . , xn-l)Qm(~m, . , ~1) m+n(~1,~~~,2~-l,0,–Ym,-ym-l,~~~,-yl). + (–llmQ This identity is most interesting when ym = ~~-1, ympl = x%-z, etc., since Qn+l(a,. . , Zk,O, zk+l,. . . , Zn) = Qn–1(zl,. , zk-1, zk + Zk+l, zk+2,. . . , Zn). In particular we find that if p,/q, = QnyI(x2,. . . , zn)/Qn(xl,. . , zn) = /x1,. . . , xn/, then p,/q, + (-l) /qir = /XI,. . . , zn,r -l,l, xn -1, z~-~, . . . ,x1/. By changing /Xl,…,Xn/ to /Xl,…, ~~-1, xn -1, l/, we can control the sign (-l)R as desired. For example, the partial sums of the first series have the following continued fractions of even length: 11, I/; /I, l,l,l,O, l/ = /I, l,l, 2/; /l, 1,1,2,1,1,1,1,1, l/; /Ll,l, 2,l,LL1,l,l,L 1,&l, 1, 1, 1, 1,&l, 1, l/ = IL 1, 1,&l, 1, l,l, 1, l,l, 2,1,1,1, 1,2,1,1, I/; and from this point on the sequence settles down and obeys a simple reflecting pattern. We find that the nth partial quotient a, can be computed rapidly as follows, if n -1 = 20q + r where 0 5 r < 20: 1, if r = 0,2,4,5,6,7,9,10,12,13,14,15,17 or 19; 2, if r = 3 or 16; a, = 1 + (q + r) mod 2, if r = 8 or 11; 2 -4, ifr=l; 1-t ds+l, if r = 18. Here d, is the dragon sequence defined by the rules do = 1, dzn = d,, d4n+l = 0, dJn+s = 1; the dragon curve discussed in exercise 4.1-18 turns right at its nth step iff d, = 1. Liouville snumberswith1~3areequalto/I-l,2+1,I2-l,1,1,I-l,1 2-l, 1, 1 -2, 1, 1, 12 - 1, 1 + 1, 1 - 1, 172 - 1, /. The nth partial quotient a, depends on the dragon sequence on mmod4 as follows: If nmod4 = 1 it is 1 - 2 + d,-1 + (ln/2j mod 4) an d f 1 nmod4=2itis1+2-ddn+2- ([n/2] mod 4); if n mod 4 = 0 it is 1 or lk!(k- ) -1, depending on whether or not d, = 0 or 1, where Ic is the largest power of 2 dividing n; and if n mod 4 = 3 it is lktck- ) -1 or 1, depending on whether d 7L+l = 0 or 1, where Ic is the largest power of 2 dividing n $1. When 1 = 2 the same rules apply, except that O s must be removed, so there is a more complicated pattern depending on n mod 24. Cf. J. Number Theory 11 (1979), 209-217