1 3 47 6 3 11 Journal of Integer Sequences, Vol. 0 (017), Article 17..8 Largest Values of the Stern Sequence, Alternating Binary Expansions Continuants Rol Paulin Max-Planck-Institut für Mathematik Vivatsgasse 7 D-53111, Bonn Germany paulinrol@gmail.com Abstract We study the largest values of the rth row of Stern s diatomic array. In particular, we prove some conjectures of Lansing. Our main tool is the connection between the Stern sequence, alternating binary expansions, continuants. This allows us to reduce the problem of ordering the elements of the Stern sequence to the problem of ordering continuants. We describe an operation that increases the value of a continuant, allowing us to reduce the problem of largest continuants to ordering continuants of very special shape. Finally, we order these special continuants using some identities inequalities involving Fibonacci numbers. 1 Introduction The Stern sequence A00487 is defined as follows: s(0) = 0, s(1) = 1, s(n) = s(n) s(n+1) = s(n)+s(n+1) for every n 0. Stern s diatomic array consists of rows indexed by 0,1,,..., where if r 0, then the rth row is s( r ),s( r +1),...,s( r+1 ). Stern s diatomic array can also be constructed in the following way. Start with the 0th row 1,1. If r 1, then to construct the rth row, copy the previous row, between every two consecutive numbers x,y, write their sum x+y. This array was first studied by Stern [7]. Lehmer [4] 1
summarized several properties of this array. Recently Defant [1] gave upper bounds for the elements of the Stern sequence. For r 0 m 1, let L m (r) denote the mth largest distinct value of the rth row of Stern s diatomic array. If there are fewer than m distinct values in the rth row, then we just take L m (r) =. Lucas [5] has observed that the largest value in the rth row is L 1 (r) = F r+, where F n denotes the nth Fibonacci number. Lansing [3] determined the second third largest values L (r) L 3 (r), formulated the following conjectures about the L m (r) s. Her Conjecture 7 [3] says that if m 1 r 4m, then L m (r) = L m (r 1)+L m (r ). Her Conjecture 9 [3] says that if m r 4m 4, then m L m (r) = L m 1 (r) F r (4m 5) = F r+ F r (4j 5). The following theorem is our main result. It gives a formula for L m (r) for certain values of r m, it implies the two conjectures of Lansing stated above. Theorem 1. If r Z 0, then {L 1 (r),...,l r (r)} = {F r+ F i F j ; i,j Z 0, i+j = r 1}. More explicitly, if 1 m r, then where j= L m (r) = F r+ F m b F r m+1+b, { 0, if m r+3 or r; 4 b = b(m,r) = 1, if m > r+3 r. 4 We show now that Theorem 1 implies the two conjectures stated above. Proof of Conjecture 7 [3]. Let m 1 r 4m. Then m (r 1)+3, so L 4 m (r) = F r+ F m F r m+1 L m (r 1) = F r+1 F m F r m by Theorem 1. If r 4m 1, then m (r )+3, while if r = 4m, then r, so either way L 4 m (r ) = F r F m F r m 1. The conjecture now follows from F r+ F m F r m+1 = (F r+1 F m F r m )+(F r F m F r m 1 ). Proof of Conjecture 9 [3]. It is enough to prove L m 1 (r) L m (r) = F r (4m 5), because L 1 (r) = F r+. Now m 1 r+3, either r = 4m 4, or m r+3. So 4 4 L m 1 (r) = F r+ F m 4 F r m+3 L m (r) = F r+ F m F r m+1 by Theorem 1. Hence L m 1 (r) L m (r) = F m F r m+1 F m 4 F r m+3 = ( 1) m 4 F F r (4m 5) = F r (4m 5) by Lemma 3.
Here is a brief description of the contents of the paper. In Section we state some basic results about Fibonacci numbers, alternating binary expansions continuants. In Section 3 we describe the connection between the Stern sequence, alternating binary expansions continuants. Using this description we reduce the problem of comparing the elements of the Stern sequence to the problem of comparing continuants, which is the subject of Section 4. (For earlier work on comparing continuants, see Ramharter s paper [6].) Using some identities involving Fibonacci numbers, we finish the proof of Theorem 1 in Section 5. Finally, in Section 6 we discuss possible extensions of our results. Preliminaries In this section we introduce some notation, state some basic results about Fibonacci numbers, alternating binary expansions continuants. Let F n denote the nth Fibonacci number for every n Z. So F 0 = 0, F 1 = 1, F n = F n 1 +F n for every n Z. Note ( ) Fn+1 F n F n F n 1 that ( 1 1 1 0) n = the Fibonacci numbers. for every n Z. The following basic lemma describes the sign of Lemma. If n Z, then F n = ( 1) n+1 F n. Hence = 0, if n = 0; F n > 0, if n > 0 or n; < 0, if n < 0 n. Proof. The first part is easy to check by induction on n, the second part follows from the first part. The following lemma describes a useful identity, which allows us to compare F i F j s with fixed i+j. Lemma 3. If i,j,k,l Z i+j = k +l, then F i F j F k F l = ( 1) k F i k F j k. Hence if i+j = k +l, then F i F j = F k F l if only if {i,j} = {k,l}. Proof. If n,i,j Z, then F n+i F n+j F n F n+i+j = ( 1) n F i F j. Dickson [, p. 404] attributes this identity to A. Tagiuri. Substituting k, i k j k into n, i j, we obtain the stated identity. To prove the second part, note that by Lemma, if n Z, then F n = 0 if only if n = 0. 3
The following lemma describes the ordering of F i F j s with i,j 0 i+j fixed. We need this result to prove the second half of Theorem 1. Lemma 4. Let n Z 0, then the set {F i F j ; i,j Z 0, i+j = n} has cardinality n+1, if m {1,..., n+1 }, then the mth smallest element of this set is F m c F n (m c), where { 0, if m n+4 or n; 4 c = 1, if m > n+4 n. 4 Proof. ThelastpartofLemma3impliesthatthecardinalityis n+1. Form {1,..., n+1 } let c(m) be defined as c in the statement above, let u(m) = m c(m) v(m) = n (m c(m)). Then u(m),v(m) 0 u(m) + v(m) = n, so F u(m) F v(m) is an element of the set. Let 1 m < m n+1. All we need to prove is that F u(m) F v(m) < F u(m )F v(m ). The difference is by Lemma 3. Here F u(m )F v(m ) F u(m) F v(m) = ( 1) u(m) F u(m ) u(m)f v(m ) u(m) u(m ) u(m) = (m m) c(m )+c(m) 1 > 0, so F u(m ) u(m) > 0. Therefore we need to prove that ( 1) c(m) F v(m ) u(m) > 0. First suppose that n. Then c(m) = c(m ) = 0, so v(m ) u(m) = n (m + m ) is odd, hence ( 1) c(m) F v(m ) u(m) > 0 by Lemma. So let n. Suppose that m > n+4. Then c(m) = 4 c(m ) = 1, m > n+4 = 4 n+, so 4 m 1 n+ n+ > n, hence 4 4 4 v(m ) u(m) = n (m +m 3) n (m+1 3) = n 4(m 1) < 0. Thus ( 1) c(m) F v(m ) u(m) > 0 by Lemma. Finally, let m n+4. Then c(m) = 0. If 4 m > n+4, then 4 c(m ) = 1 v(m ) u(m), so F v(m ) u(m) > 0. If m n+4, then 4 c(m ) = 0 4m 4 n, so v(m ) u(m) = n (m +m ) n (m 3) > n (4m 4) 0, hence F v(m ) u(m) > 0. Now we turn to the discussion of alternating binary expansions. For d,l 0 Z 0, l 1,...,l d Z 1 we define A(l 0,...,l d ) = d ( 1) d i l 0+ +l i. i=0 We call this an alternating binary expansion. The following lemma gives a bound for A(l 0,...,l d ). 4
Lemma 5. If d,l 0 Z 0 l 1,...,l d Z 1, then If d > 0, then A(l 0,...,l d ) < l 0+ +l d. l 0+ +l d 1 A(l 0,...,l d ) l 0+ +l d. Proof. We prove by induction on d. For d = 0 this is trivial, so suppose that d 1 that the statement is true for smaller values of d. Let k i = l 0 + +l i for every i {0,1,...,d}. Then 0 k 0 < k 1 < < k d, A(l 0,...,l d ) = k d k d 1 + k d + ( 1) d k 0 = k d A(l0,...,l d 1 ). Here 0 < k d 1 1 A(l 0,...,l d 1 ) k d 1 k d 1 by the induction hypothesis, so k d 1 A(l 0,...,l d ) < k d. The following lemma describes the number of alternating binary expansions of a positive integer. Lemma 6. Every n Z 1 has exactly two alternating binary expansions, exactly one of these has the form n = A(l 0,1,l,...,l d ), where l 0 Z 0 d,l,...,l d Z 1. If n is a power of, then d = 1 the other expansion is n = A(l 0 ), while otherwise d the other expansion is A(l 0,l +1,l 3,...,l d ). Proof. It is easy to check that A(l 0,1) = A(l 0 ) = l 0 A(l 0,1,l,...,l d ) = A(l 0,l + 1,l 3,...,l d ) for d. Hence it is enough to prove that every n Z 1 has exactly one alternating binary expansion of the form n = A(l 0,...,l d ) such that d 1 l 1 = 1. We prove by induction on n. Let k be the unique positive integer such that k 1 n < k. Let k i = l 0 + +l i for i {0,...,d}. Then k d n < k d by Lemma 5, so kd = k. Moreover n = k A(l 0,...,l d 1 ), so n = A(l 0,...,l d 1 ) = k n. If d = 1, then l 0 = k 1 n = A(l 0,1) = k 1. Now let d. Then A(l 0,...,l d 1 ) < k d 1 k 1 by Lemma 5, so k 1 < n < k n < k 1 < n. By the induction hypothesis, there is a unique expansion n = A(l 0,...,l d 1 ) with l 1 = 1, where furthermore l 0 + +l d 1 k 1, because n < k 1. Then l d = k (l 0 + +l d 1 ) Z 1 is also determined. Now we will recall some basic facts about continuants. Continuants are polynomials in several variables, which come up often when working with continued fractions. We define the dth continuant K d (X 1,...,X d ) Z[X 1,...,X d ] for every d Z 0, by the following recursion: K 0 = 1, K 1 (X 1 ) = X 1, K d (X 1,...,X d ) = X d K d 1 (X 1,...,X d 1 )+K d (X 1,...,X d ) for every d. We can safely write K(X 1,...,X d ) instead of K d (X 1,...,X d ), because d is anyway determined by the number of variables. If X = (X 1,...,X d ), then we will also use the notation K(X) = K(X 1,...,X d ). The continuants are related to continued fractions by the following identity: [a 0,a 1,...,a d ] = a 0 + 1 a 1 + 1... + 1 a d = K(a 0,...,a d ) K(a 1,...,a d ) 5
for every d 0. The following lemma gives maybe the most practical description of continuants, using matrices. Lemma 7. If d, then ( ) ( ) Kd (X 1,...,X d ) K d 1 (X 1,...,X d 1 ) X1 1 = K d 1 (X,...,X d ) K d (X,...,X d 1 ) 1 0 ) ( Xd 1 1 0). So if d 0, then K d (X 1,...,X d ) = M 1,1, where M = ( X 1 1 1 0 Proof. This easily follows from the defining recursion by induction on d. The continuants have the following symmetry property. Lemma 8. K(X 1,...,X d ) = K(X d,...,x 1 ) for every d 0. Proof. Let M = ( ) ( X 1 1 Xd 1 1 0 1 0), then M T = ( ) X d 1 T ( X1 ) 1 T ( 1 0 1 0 = Xd ) ( 1 X1 1 1 0 1 0), hence K(X d,...,x 1 ) = (M T ) 1,1 = M 1,1 = K(X 1,...,X d ) by Lemma 7. ( ) Xd 1. 1 0 The following lemma states a few simple identities involving continuants. Lemma 9. If d 1, then If d, then If d 1, then K(X 1,...,X d ) = K(X 1 1,X,...,X d )+K(X,...,X d ). K(1,X,...,X d ) = K(X,...,X d )+K(X 3,...,X d ). K(1,X 1,X,...,X d ) = K(X 1 +1,X,...,X d ) K(X 1,...,X d 1,X d,1) = K(X 1,...,X d 1,X d +1). Proof. The identities are trivial for d = 1, so assume that d. Using Lemma 8 the defining recursion of the continuants, we obtain Substituting X 1 1 into X 1, we get K(X 1,...,X d ) = X 1 K(X,...,X d )+K(X 3,...,X d ). K(X 1 1,X,...,X d ) = (X 1 1)K(X,...,X d )+K(X 3,...,X d ). These two equations immediately imply the first part of the lemma. Substituting 1 into X 1 in the first equation, we obtain the second part of the lemma. The fourth identity follows from the third one by Lemma 8. Finally, K(X 1 +1,X,...,X d ) = K(X 1,...,X d )+K(X,...,X d ) = K(1,X 1,...,X d ) by the first two parts of the lemma. 6
3 Connecting the Stern sequence, alternating binary expansions continuants The following proposition describes the connection between the Stern sequence, alternating binary expansions continuants. This result plays a central role in this paper: it allows us to reduce the problem of ordering the elements of the Stern sequence to the problem of ordering continuants. Proposition 10. If d,l 0 Z 0 l 1,...,l d Z 1, then s(a(l 0,l 1,...,l d )) = K(l 1,...,l d ). Proof. We prove by induction on l 0 + +l d. So let S Z 0, suppose the statement is true if l 0 + + l d < S. Now let l 0 + + l d = S. If l 0 > 0, then A(l 0,l 1,...,l d ) = l 0 A(0,l 1,...,l d ), so s(a(l 0,l 1,...,l d )) = s(a(0,l 1,...,l d )) = K(l 1,...,l d ) by the induction hypothesis. So assume that l 0 = 0. Letk i = l 0 + +l i foreveryi {0,...,d}, letn = A(l 0,l 1,...,l d ) = d i=0 ( 1)d i k i. Note that k 0 = l 0 = 0, so k 1 = l 1. Here n > 0 by Lemma 5, n is odd, so n = m+1 for some m Z 0. If d = 0, then n = 1, s(1) = 1 = K(). So let d 1. First suppose that l 1. If d is even, then m = A(l 1 1,l,...,l d ) m+1 = A(0,l 1 1,l,...,l d ), while if d is odd, then m+1 = A(l 1 1,l,...,l d ) m = A(0,l 1 1,l,...,l d ). (Note that l 1 1 1.) So either way we get s(n) = s(m)+s(m+1) = s(a(0,l 1 1,l,...,l d ))+s(a(l 1 1,l,...,l d )) = K(l 1 1,l,...,l d )+K(l,...,l d ) = K(l 1,...,l d ) using the induction hypothesis Lemma 9. Now suppose that l 1 = 1. If d = 1, then n = A(0,1) = 1 s(n) = 1 = K(1). So let d. If d is odd, then m = A(l,...,l d ) m + 1 = A(0,l,...,l d ), while if d is even, then m+1 = A(l,...,l d ) m = A(0,l,...,l d ). So either way we get s(n) = s(m)+s(m+1) = s(a(0,l,...,l d ))+s(a(l,...,l d )) = K(l,...,l d )+K(l 3,...,l d ) = K(1,l,...,l d ) = K(l 1,...,l d ) using the induction hypothesis Lemma 9. For r Z let us define E r = {(l 1,...,l d ); d Z 1,l 1,...,l d Z 1, l 1 = l d = 1, l 1 + +l d = r +1} E r = {(l 1,...,l d ); d Z 1,l 1,...,l d Z 1, l 1 = l d = 1, l 1 + +l d r +1}. Using Lemmas 5, 6 Proposition 10, we obtain the following corollary. 7
Corollary 11. If r Z 0, then the set of values of the rth row of Stern s diatomic array is {s(n); r n r+1 } = {K(l); l E r}. Proof. Suppose that l E r. Let l 0 = r +1 r i=1 l i n = A(l 0,...,l d ). Then r n r+1 s(n) = K(l)byLemma5Proposition10. Sothelefthsidecontainstheright h side. Conversely, let n { r,..., r+1 }. If n = r or n = r+1, then s(n) = 1 = K(1). So suppose that r < n < r+1. According to Lemma 6, n has an alternating binary expansion n = A(l 0,...,l d ) with d 1 l 1 = 1. Here l 1 + +l d l 0 + +l d = r+1 by Lemma 5, s(n) = K(l 1,...,l d ) by Proposition 10. So if l d = 1, then l = (l 1,...,l d ) E r s(n) = K(l). If l d > 1, then l = (l 1,...,l d 1,1) E r s(n) = K(l) = K(l ) by Lemma 9. So the right h side contains the left h side. This corollary implies that L m (r) is the mth largest distinct value in {K(l); l E r}. So we need to compare the continuants K(l), where l E r. 4 Comparing continuants Thefollowingpropositiondescribesasimpleoperationon(l 1,...,l d )thatincreasesk(l 1,...,l d ). This operation is our main tool in comparing continuants. Proposition 1. Let d,l 1,...,l d Z 1, j {1,...,d}, suppose that l j = u + v for some u,v Z 1. Then K(l 1,...,l d ) K(l 1,...,l j 1,u,v,l j+1,...,l d ), where equality holds if only if j = 1 u = 1, or j = d v = 1. Proof. Lemma 7 implies that where P = ( l 1 1 1 0 we obtain ) ( lj 1 1 1 0 K(l 1,...,l d ) = (P ( u+v 1 1 0 )Q) 1,1 K(l 1,...,l j 1,u,v,l j+1,...,l d ) = (P ( u 1 1 0)( v 1 0)Q) 1 1,1, ) ( Q = lj+1 ) ( 1 ld 1 1 0 1 0). Using ( u 1 1 0)( v 1 1 0) ( u+v 1 1 0 ) = ( (u 1)(v 1) u 1 v 1 1 ) = ( u 1 1 )(v 1,1) = K(l 1,...,l j 1,u,v,l j+1,...,l d ) K(l 1,...,l d ) = (P ( u 1 1 )(v 1,1)Q) 1,1 = (P 1,1 (u 1)+P 1, )(Q 1,1 (v 1)+Q,1 ). Here P 1,1,P 1,,Q 1,1,Q,1,u 1,v 1 0, so 0. Note that detp,detq { 1,1}, since det( X 1 1 0 ) = 1. So (P 1,1,P 1, ) (0,0) (Q 1,1,Q,1 ) (0,0). Hence = 0 if only if u = 1 P 1, = 0, or v = 1 Q,1 = 0. It is easy to see that P 1, = 0 if only if j = 1, similarly, Q,1 = 0 if only if j = d. 8
We introduce some notation. Let For r Z a Z 0 let h(l 1,...,l d ) = d (l i 1) = l 1 + +l d d. i=1 E r,a = {(l 1,...,l d ) E r ; h(l 1,...,l d ) = a} E r,a = {(l 1,...,l d ) E r; h(l 1,...,l d ) = a}. Then E r = a 0 E r,a = t r a 0 E t,a. For s,p 0,p 1,...,p s Z 0 let w p0,...,p s (X 1,...,X s ) = (1,...,1,X }{{} 1,1,...,1,X }{{},...,1,...,1,X }{{} s,1,...,1 }{{} p 0 p 1 p s 1 κ p0,...,p s (X 1,...,X s ) = K(w p0,...,p s (X 1,...,X s )). p s ) For s = 0 we simply write w p0 = (1,...,1) }{{} p 0 κ p0 = K(w p0 ). The idea is that starting from (l 1,...,l d ) E r, using the operation of Proposition 1 several times, also possibly increasing elements or adding new elements to (l 1,...,l d ), we can increase K(l 1,...,l n ) to K(w r+1 ). If we stop a bit earlier, we get the largest continuants. The precise statement is described in the following proposition. Proposition 13. If r Z 0 l E r \(E r,0 E r,1 ), then there is an m E r 1,0 E r, such that K(l) K(m). Proof. We will use several times that if u 1,...,u d Z 1, then K(u 1,...,u d ) K(u 1,...,u d,1), if u 1,...,u d Z 1 u i u i for every i, then K(u 1,...,u d ) K(u 1,...,u d). We prove by induction on h(l). If h(l) = 0, then l = w d for some d r, so we can take m = w r E r 1,0. If h(l) = 1, then l = w p0,p 1 () for some p 0,p 1 Z 1 with p 0 +p 1 r, so we can take m = w p0,r p 0 (3) E r,. Finally, let h(l), suppose that the statement is true for smaller values of h. Then there is a j {,...,d 1} such that l j. Let l = (l 1,...,l j 1,l j 1,1,l j+1,...,l d ), then l E r, K(l) K(l ) by Proposition 1. Moreover h(l ) = h(l) 1 1, so l / E r,0. If l / E r,1, then by the induction hypothesis there is an m E r 1,0 E r, such that K(l) K(l ) K(m). So suppose that l E r,1. Then l E r,, so we can take m = l. 9
5 Fibonacci identities Based on Proposition 13, our next goal is to calculate K(l) for l E r,0 E r,1 E r 1,0 E r,. If r 1, then E r,0 = {w r+1 }, E r 1,0 = {w r }, E r, = U r V r, where E r,1 = {w p0,p 1 (); p 0,p 1 Z 1, p 0 +p 1 = r 1}, U r = {w p0,p 1 (3); p 0,p 1 Z 1, p 0 +p 1 = r } V r = {w p0,p 1,p (); p 0,p Z 1, p 1 Z 0, p 0 +p 1 +p = r 3}. In general κ p0,...,p s (X 1,...,X s ) = M 1,1, where ) ( 1 1 1 0) p 1 ( X 1 1 0 ) ( X s 1 1 0 )(1 1 1 0) ps. M = ( 1 1 1 0) p ( 0 X 1 1 1 0 ( ) Note that ( 1 1 1 0) p Fp+1 F = p F p F p 1 for every p Z. Calculating the matrix products, we get κ p0 = F p0 +1, κ p0,p 1 () = F p0 +1F p1 +1 +F p0 +1F p1 +F p0 F p1 +1, κ p0,p 1 (3) = 3F p0 +1F p1 +1 +F p0 +1F p1 +F p0 F p1 +1, κ p0,p 1,p (,) =F p0 +1F p1 F p +F p0 F p1 +1F p +F p0 +1F p1 +1F p +F p0 +1F p1 1F p +1 +F p0 F p1 F p +1 +4F p0 +1F p1 F p +1 +F p0 F p1 +1F p +1 +4F p0 +1F p1 +1F p +1. In the following lemma we express these values in more useful forms. Lemma 14. If p 0,p 1,p Z 0, then κ p0,p 1 () = F p0 +p 1 +3 F p0 F p1 = F p0 +p 1 + +F p0 +p 1 +F p0 1F p1 1, κ p0,p 1 (3) = F p0 +p 1 +3 +F p0 +p 1 +1 F p0 +p 1 F p0 F p1, κ p0,p 1,p (,) =(F p0 +p 1 +p +4 +F p0 +p 1 +p + F p0 +p 1 +p 4) ( F p1 (F p0 1F p 1 +3F p0 F p 1 +3F p0 1F p )+F p0 F p1 +1F p ). Proof. If i,j Z, then ( ) ( )( ) Fi+j+1 F i+j F i+j F i+j 1 = ( 1 1 1 0) i+j = ( 1 1 1 0) i ( 1 1 1 0) j = Fi+1 F i Fj+1 F j F i F i 1 F j F j 1, hence F i+j = F i+1 F j +F i F j 1. Applying this identity twice, we get that F i+j+k = F i+j+1 F k + F i+j F k 1 = (F i+1 F j+1 + F i F j )F k + (F i+1 F j + F i F j 1 )F k 1 for i,j,k Z. Using these identities, one can express every term in the statement of the Lemma as a polynomial of F p0,f p0 +1,F p1,f p1 +1,F p,f p +1. Comparing the obtained polynomials, one can check the stated identities. The calculations could be done by h, but they are tedious. Instead we have used Mathematica [8] to carry out these symbolic calculations, this is done in the attached file. 10
Corollary 15. If r 6, then So if r 6, then with strict inequality for r 7. max{k(l); l E r,1 } < F r+ = κ r+1, min{k(l); l E r,1 } = κ 1,r () = F r+1 +F r 1, max{k(l); l U r } = κ,r 4 (3) = F r+1 +F r 1 F r 4, max{k(l); l V r } = κ,0,r 5 (,) = F r+1 +F r 1 F r 7. max{k(l); l E r 1,0 E r, } min{k(l); l E r,1 }, Proof. Let r 6. Recalling the description of E r,1, U r V r, we see that {K(l); l E r,1 } = {κ p0,p 1 (); p 0,p 1 Z 1, p 0 +p 1 = r 1}, {K(l); l U r } = {κ p0,p 1 (3); p 0,p 1 Z 1, p 0 +p 1 = r }, {K(l); l V r } = {κ p0,p 1,p (); p 0,p Z 1, p 1 Z 0, p 0 +p 1 +p = r 3}. Using Lemma 14 one can easily reduce the first part of the proposition to the following statements. If p 0,p 1 Z 1 p 0 + p 1 = r 1, then F p0 F p1 > 0 F p0 1F p1 1 0. If p 0,p 1 Z 1 p 0 + p 1 = r, then F p0 F p1 0. If p 0,p Z 1, p 1 Z 0 p 0 +p 1 +p = r 3, thenf p1 (F p0 1F p 1+3F p0 F p 1+3F p0 1F p )+F p0 F p1 +1F p 0. These statements follow from the facts that F n > 0 for n 1, F n 0 for n 1. Now we prove the last part. If l E r 1,0, then K(l) = κ r = F r+1 < F r+1 + F r 1. Since E r, = U r V r, the statement follows from F r+1 + F r 1 F r 4 < F r+1 + F r 1 F r+1 +F r 1 F r 7 F r+1 +F r 1. Note that here F r 7 > 0 if r 6 r 7. Now we are ready to prove our main result. Proof of Theorem 1. The second part of the theorem follows from the first part by Lemma 4. We prove now the first part. For r {0,1,,3,4,5} one could check the statement by h. The attached Mathematica file contains a program that does this. Suppose that r 6, let m 1. By Corollary 11, L m (r) is the mth largest distinct value in {K(l);l E r}. If l E r \(E r,0 E r,1 ), then K(l) min(k(l ); l E r,1 ) by Proposition 13 Corollary 15. Moreover {K(l); l E r,0 } = {F r+ } {K(l); l E r,1 } = {F r+ F i F j ; i,j Z 1, i+j = r 1} by Lemma 14. So {L 1 (r),...,l H (r)} = H, where Here H = r by Lemma 4. H = {F r+ F i F j ; i,j Z 0, i+j = r 1}. 11
6 Further research Using our results, it would not be hard to describe the exact positions where the first r largest values in the rth row of Stern s diatomic sequence appear. To determine L m (r) for 1 m r, we needed to calculate (sometimes) compare the values of K(l) for l E r,0 E r,1 E r,. To go a step further, i.e., to determine L m (r) for some m > r, we would probably need to calculate compare the values of K(l) for l 3 i=0 E r,i. For example, we have ordered {K(l); l E r,0 E r,1 }, but we have not yet ordered {K(l); l E r, }. Instead of studying Stern s diatomic array, which starts with the 0th row 1,1, we could study the following generalization. Start with the 0th row a,b, where a,b R, in each step construct a new row by copying the last row, writing between each two consecutive elements their sum. One could try to underst the largest values in the rth row of this array. 7 Acknowledgments The work presented here was carried out at the University of Salzburg, where I was supported by the Austrian Science Fund (FWF): P4574. References [1] C. Defant, Upper bounds for Stern s diatomic sequence related sequences, preprint, http://arxiv.org/abs/1506.0784, 015. [] L. E. Dickson, History of the Theory of Numbers, Vol. I: Divisibility Primality. Chelsea Publishing Co., 1966. [3] J. Lansing, Largest values for the Stern sequence, J. Integer Seq., 17 (014), Article 14.7.5. [4] D. H. Lehmer, On Stern s diatomic series, Amer. Math. Monthly, 36 (199), 59 67. [5] E. Lucas, Sur les suites de Farey, Bull. Soc. Math. France, 6 (1878), 118 119. [6] G. Ramharter, Extremal values of continuants, Proc. Amer. Math. Soc., 89 (1983), 189 01. [7] M. Stern, Über eine zahlentheoretische Funktion, J. Reine Angew. Math., 55 (1858), 193 0. [8] Wolfram Research, Inc., Mathematica, Version 10.0, 014. 1
010 Mathematics Subject Classification: Primary 11A55; Secondary 11B39. Keywords: Stern sequence, alternating binary expansion, continuant. (Concerned with sequence A00487.) Received September 13 016; revised version received November 15 016. Published in Journal of Integer Sequences, December 7 016. Return to Journal of Integer Sequences home page. 13