INTEGERS 12 (2012) #A3 A CORRELATION IDENTITY FOR STERN’S SEQUENCE Michael Coons1 Dept. of Pure Mathematics, University of Waterloo, Waterloo, Ontario, Canada mcoons@math.uwaterloo.ca Received: 5/17/11, Accepted: 12/5/11, Published: 1/2/12 Abstract The Stern sequence (also called Stern’s diatomic sequence), is defined by the recurrence relations s(0) = 0, s(1) = 1, and in general by s(2n) = s(n), and s(2n + 1) = s(n) + s(n + 1). In this note we prove a new identity for Stern’s sequence. In particular, we show that if e and a are nonnegative integers, then for any integer r with 0 ≤ r ≤ 2e , we have s(r)s(2a + 5) + s(2e − r)s(2a + 3) = s(2e (a + 2) + r) + s(2e (a + 1) + r). It seems that this is the first correlation–type identity concerning Stern’s sequence in the literature. 1. Introduction The Stern sequence (also called Stern’s diatomic sequence; A002487 in Sloane’s list), is defined by the recurrence relations s(0) = 0, s(1) = 1, and in general by s(2n) = s(n) and s(2n + 1) = s(n) + s(n + 1). In this note, we prove the following result. Theorem 1. Let e and a be nonnegative integers. Then for any integer r with 0 ≤ r ≤ 2e , we have s(r)s(2a + 5) + s(2e − r)s(2a + 3) = s(2e (a + 2) + r) + s(2e (a + 1) + r). (1) Recently, Bacher introduced a twisted version of the Stern sequence. He defined the sequence {t(n)}n≥0 given by the recurrence relations t(0) = 0, t(1) = 1, and in general by t(2n) = −t(n) and t(2n + 1) = −t(n) − t(n + 1). Proving a conjecture of Bacher [1] connecting the Stern sequence {s(n)}n≥0 with it’s twist {t(n)}n≥0 we gave the following result [2]. Theorem 2. (Theorem 1.1 of [2]]) There exists an integral sequence {u(n)}n!0 such that for all e ! 0 we have ! ! e t(3 · 2e + n)z n = (−1)e S(z) u(n)z n·2 , (2) n!0 1 The n!0 research of M. Coons is supported by a Fields–Ontario Fellowship and NSERC. 2 INTEGERS: 12 (2012) where S(z) denotes the generating function of the Stern sequence. Note that in this theorem (as in the original conjecture), it is implicit that the sequence {u(n)}n!0 is defined by the relationship " n ! n!0 t(3 + n)z n U (z) := u(n)z = . S(z) n!0 We will prove Theorem 1 as a corollary of Theorem 2. 2. Preliminaries Lemma 3. The generating series S(z) = tion # S(z 2 ) = " s(n)z n satisfies the functional equa$ S(z). 2 n!0 z 1+z+z We will need the following lemmas (see [1, Theorem 1.2]). Lemma 4. For all e ≥ 0 and for all n such that 0 ≤ r ≤ 2e we have s(2e + r) = s(2e − r) + s(r). Lemma 5. (Bacher [1]]) We have t(3 · 2e + r) = t(6 · 2e − r) = (−1)e s(r) for all e ! 0 and for all r such that 0 ≤ r ≤ 2e+1 . Theorem 6. (Bacher [1]]) For all e ! 1, we have e−1 %& 1+z 2i +z i=0 2i+1 ' e 3·2 (−1)e ! = t(3 · 2e + n)z n . z(1 + z 2e ) n=0 Using the definitions above, Theorem 6 and the functional equation for S(z), we have that the right–hand side of (2) is e e S(z) ! t(3 + n)z 2 n S(z 2e ) n!0 ( ) e−1 % 1 + z 2i + z 2i+1 ! e e = (−1) · t(3 + n)z 2 n i 2 z i=0 n!0 (−1)e S(z)U (z 2 ) = (−1)e e−1 ' ! i i+1 e z %& 1 + z2 + z2 · t(3 + n)z 2 n e 2 z i=0 n!0 ( e ) 3·2 ! ! e 1 2 n e n = 2e t(3 + n)z t(3 · 2 + n)z . z (1 + z 2e ) n=0 = (−1)e n!0 This calculation combined with Theorem 2 gives the following corollary. 3 INTEGERS: 12 (2012) Corollary 7. For all e ! 0, we have ( e ) 3·2 ! ! e e ! e z 2 (1 + z 2 ) t(3 · 2e + n)z n = t(3 + n)z 2 n t(3 · 2e + n)z n . (3) n!0 n=0 n!0 " Now write the left–hand side of (3) as G(z) = " hand side of (3) as H(z) = n≥0 h(n)z n ; that is, G(z) = ! e e g(n)z n = z 2 (1 + z 2 ) n≥0 and n≥0 ! n!0 ! ( 2e n g(n)z n and write the right– t(3 · 2e + n)z n , e 3·2 ! ) Then we have H(z) = and if n ∈ [0, 2e ) 0 e+1 g(n) = t(2 + n) if n ∈ [2e , 2e+1 ) e+1 t(2 + n) + t(2e + n) if n ∈ [2e+1 , ∞) t(3 + n)z n!0 h(n) = ! 2e k+j=n 0"j"3·2e k∈N n=0 t(3 · 2 + n)z e t(3 + k)t(3 · 2e + j). n . (4) (5) Note that if we let k = 0, then t(3 + k) = 0, so that we can assume that k ∈ N. Also, it is easy to see that we can rewrite (5) as ! h(n) = t(3 + k)t(3 · 2e + n − 2e k). (6) n 2e −3"k" 2ne 2 3 Note that n − 2e 2ne = r mod 2e , where r is the residue of n modulo 2e which lies in the set {0, 1, . . . , 2e − 1}. Thus, 4n5 n − 2e e = r, &4 n 5 2 ' e n−2 − 1 = r + 2e , e 2 &4 n 5 ' n − 2e − 2 = r + 2 · 2e , 2e 6 7 where r is defined as above. Thus all the values of 3 · 2e + n − 2e k for k ∈ 2ne − 3, n3 lie in the interval (3 · 2e + 1, 6 · 2e − 1), and thus (6) becomes & 4 n 5' & 4 n 5' & 4 n 5' h(n) = t 3 + e t(3·2e +r)+t 2 + e t(4·2e +r)+t 1 + e t(5·2e +r). 2 2 2 4 INTEGERS: 12 (2012) Applying Lemma 5 we have that t(5 · 2e + r) = t(6 · 2e − (2e − r)) = t(3 · 2e + (2e − r)) = t(4 · 2e − r), and thus the above equality becomes & 4 n 5' & 4 n 5' & 4 n 5' h(n) = t 3 + e t(3·2e +r)+t 2 + e t(4·2e +r)+t 1 + e t(4·2e −r), 2 2 2 or rather & 4 n 5' & 4 n 5' h(n) = t 3 + e t(3 · 2e + r) + t 2 + e t(3 · 2e + r + 2e ) 2 2 & 4 n 5' + t 1 + e t(3 · 2e − r + 2e ). 2 (7) With this identity for h(n) in hand, we are ready to prove Theorem 1. 3. Proof of Theorem 1 Proof of Theorem 1. Let e and a be nonnegative integers, and let r be an integer with 0 ≤ r ≤ 2e . To prove Theorem 1 we will show that the right–hand side of (1) is equal to the left–hand side of (1). To this end, define b := 2e a + r. Then the right–hand side of (1) becomes s(2e (a + 2) + r) + s(2e (a + 1) + r) = s(2e a + r + 2 · 2e ) + s(2e a + r + 2e ) = s(b + 2 · 2e ) + s(b + 2e ). Let k be any positive integer satisfying k ≥ log2 (a + 3) + e, and note that this implies that b ≤ 2k so that both b + 2 · 2e and b + 2e are less than or equal to 2k+1 . Then applying Lemma 5 we have 8 9 s(2e (a + 2) + r) + s(2e (a + 1) + r) = (−1)k t(3 · 2k + b + 2 · 2e ) + t(3 · 2k + b + 2e ) . Since k ≥ e and b ≥ 0 we have 3 · 2k + b ! 2e+1 , so that the previous equality yields (−1)k g(3 · 2k + b) = s(2e (a + 2) + r) + s(2e (a + 1) + r), (8) where g(n) is as in (4). By Theorem 2 we have that g(n) = h(n) for all n ≥ 0, so that using identity (7) and the definition of b yields INTEGERS: 12 (2012) 5 ! " #$ ! " #$ 3 · 2k + b 3 · 2k + b e g(3 · 2k + b) = t 3 + t(3 · 2 + r) + t 2 + t(3 · 2e + r + 2e ) 2e 2e ! " #$ 3 · 2k + b +t 1+ t(3 · 2e − r + 2e ) 2e ! " #$ 3 · 2k + 2e a + r =t 3+ t(3 · 2e + r) 2e ! " #$ 3 · 2k + 2e a + r +t 2+ t(3 · 2e + r + 2e ) 2e ! " #$ 3 · 2k + 2e a + r +t 1+ t(3 · 2e − r + 2e ) 2e = t(3 · 2k−e + a + 3)t(3 · 2e + r) + t(3 · 2k−e + a + 2)t(3 · 2e + r + 2e ) + t(3 · 2k−e + a + 1)t(3 · 2e − r + 2e ). Since k ≥ log2 (a + 3) + e we have that a + j ≤ 2k−e for j = 1, 2, 3, and so we may apply Lemma 5. Thus continuing the proceeding equalities by applying Lemma 5 several times, we have : ; g(3 · 2k + b) = (−1)k s(a + 3)s(r) + s(a + 2)s(2e + r) + s(a + 1)s(2e − r) . We now use Lemma 4 and gather the terms with s(r) and s(2e − r) to get : ; g(3 · 2k + b) = (−1)k s(r)(s(a + 3) + s(a + 2)) + s(2e − r)(s(a + 2) + s(a + 1) , so that using the definition of the Stern sequence we have : ; g(3 · 2k + b) = (−1)k s(r)s(2a + 5) + s(2e − r)s(2a + 3) . To complete the proof we apply identity (8) to the left–hand side to give s(2e (a+2)+r)+s(2e (a+1)+r) = (−1)k g(3·2k +b) = s(r)s(2a+5)+s(2e −r)s(2a+3), which is the desired result. References [1] R. Bacher, Twisting the Stern sequence, preprint, http://arxiv.org/pdf/ 1005.5627. [2] M. Coons, On some conjectures concerning Stern’s sequence and its twist, Integers 11 (2011), A35, 14pp. [3] K. Dilcher and K. Stolarsky, A polynomial analogue of the Stern sequence, Int. J. Number Theory 3 (2007), no. 1, 85–103. [4] M. A. Stern, Über eine zahlentheoretische Function, J. Reine Angew. Math. 55 (1858), 193– 220.