Refining the Stern Diatomic Sequence

Similar documents
Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to The American Mathematical Monthly.

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

ARITHMETIC PROPERTIES FOR HYPER M ARY PARTITION FUNCTIONS

Identifying an m-ary Partition Identity through an m-ary Tree

ON THE NUMBER OF HYPER m-ary PARTITIONS. Tom Edgar Department of Mathematics, Pacific Lutheran University, Tacoma, Washington

Exploring the Calkin-Wilf Tree: Subtrees and the Births of Numbers

PRACTICE PROBLEMS: SET 1

MATH FINAL EXAM REVIEW HINTS

Largest Values of the Stern Sequence, Alternating Binary Expansions and Continuants

arxiv: v1 [math.co] 24 Feb 2011

Arithmetic properties of coefficients of power series expansion of. (with an appendix by Andrzej Schinzel)

8 Primes and Modular Arithmetic

ON PARTITION FUNCTIONS OF ANDREWS AND STANLEY

Polynomials Characterizing Hyper b-ary Representations

THE DENOMINATORS OF POWER SUMS OF ARITHMETIC PROGRESSIONS. Bernd C. Kellner Göppert Weg 5, Göttingen, Germany

CPSC 467: Cryptography and Computer Security

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

arxiv: v1 [math.nt] 19 Dec 2018

Baltic Way 2003 Riga, November 2, 2003

Discrete valuation rings. Suppose F is a field. A discrete valuation on F is a function v : F {0} Z such that:

Mathematical Olympiad Training Polynomials

MATH 361: NUMBER THEORY FOURTH LECTURE

EXTENDING A THEOREM OF PILLAI TO QUADRATIC SEQUENCES

N E W S A N D L E T T E R S

Fast Polynomial Multiplication

PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes

arxiv: v2 [math.nt] 6 Nov 2017

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

SEVERAL PROOFS OF THE IRREDUCIBILITY OF THE CYCLOTOMIC POLYNOMIALS

MATH 201 Solutions: TEST 3-A (in class)

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Integer-Valued Polynomials

On divisibility of Narayana numbers by primes

Two Diophantine Approaches to the Irreducibility of Certain Trinomials

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

Arithmetic Properties for a Certain Family of Knot Diagrams

A Conjectured Combinatorial Interpretation of the Normalized Irreducible Character Values of the Symmetric Group

Divisibility. Chapter Divisors and Residues

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

PROBLEM SET 1 SOLUTIONS 1287 = , 403 = , 78 = 13 6.

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

CPSC 467b: Cryptography and Computer Security

Mathematical Induction

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

Fall 2017 Test II review problems

Monomial Graphs and Generalized Quadrangles

#A19 INTEGERS 17 (2017) A GENERALIZED STERN-BROCOT TREE

0 Sets and Induction. Sets

Homework 7 Solutions, Math 55

David Adam. Jean-Luc Chabert LAMFA CNRS-UMR 6140, Université de Picardie, France

Analytic Number Theory Solutions

Algebra for error control codes

Improved Bounds on the Anti-Waring Number

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

Journal of Number Theory

+ 1 3 x2 2x x3 + 3x 2 + 0x x x2 2x + 3 4

POTENTIAL PROBLEM DESCRIPTIONS

Objective Type Questions

Introduction to Number Theory. The study of the integers

On Stern s Diatomic Sequence 0,1,1,2,1,3,2,3,1,4,...

Tewodros Amdeberhan, Dante Manna and Victor H. Moll Department of Mathematics, Tulane University New Orleans, LA 70118

Subtraction games. Chapter The Bachet game

and LCM (a, b, c) LCM ( a, b) LCM ( b, c) LCM ( a, c)

February 2017 February 18, 2017

Basic elements of number theory

Basic elements of number theory

g(x) = 1 1 x = 1 + x + x2 + x 3 + is not a polynomial, since it doesn t have finite degree. g(x) is an example of a power series.

Addition sequences and numerical evaluation of modular forms

k-protected VERTICES IN BINARY SEARCH TREES

An identity involving the least common multiple of binomial coefficients and its application

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

COM S 330 Lecture Notes Week of Feb 9 13

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

What you learned in Math 28. Rosa C. Orellana

Finite Fields. Mike Reiter

Part IA. Numbers and Sets. Year

arxiv: v1 [math.nt] 8 Jan 2014

NOTES Edited by William Adkins. On Goldbach s Conjecture for Integer Polynomials

Solutions to Practice Final

Cyclic codes: overview

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

where c R and the content of f is one. 1

On the power-free parts of consecutive integers

INFINITELY MANY ELLIPTIC CURVES OF RANK EXACTLY TWO. 1. Introduction

Proof by Contradiction

RANK AND PERIOD OF PRIMES IN THE FIBONACCI SEQUENCE. A TRICHOTOMY

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

SOME HINTS AND ANSWERS TO 18.S34 SUPPLEMENTARY PROBLEMS (Fall 2007)

SQUARE ROOTS OF 2x2 MATRICES 1. Sam Northshield SUNY-Plattsburgh

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Self-reciprocal Polynomials Over Finite Fields

A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve

Discrete Mathematics. Kishore Kothapalli

Exam in Discrete Mathematics

MATH 215 Final. M4. For all a, b in Z, a b = b a.

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

arxiv: v1 [math.nt] 9 Sep 2017

Properties of the Integers

arxiv: v1 [math.nt] 26 Jun 2015

Transcription:

Refining the Stern Diatomic Sequence Richard P. Stanley Massachusetts Institute of Technology Cambridge, MA 0139-4307 <rstan@math.mit.edu> Herbert S. Wilf University of Pennsylvania Philadelphia, PA 19104-6395 <wilf@math.upenn.edu> Abstract We refine the celebrated Stern Diatomic Sequence {b(n)} n 0, in which b(n) is the number of partitions of n into powers of for which each part has multiplicity 1 or, by studying the sequence {b(n, k)} n,k 0, in which b(n, k) counts the partitions of n into powers of in which exactly k parts have multiplicity, the remaining parts being of multiplicity 1. We find closed formulas for the b(n, k) as well as for various of their associated generating functions. Relationships with Lucas polynomials and other number theoretic functions are discussed. 1 Introduction The Stern diatomic sequence, {b(n)} n=0, which begins as1 1,1,,1,3,,3,1,4,3, 5,, 5,3,4,1,5, 4, 7, 3,8,..., (1) has many magical properties, among which are the following. 1. The sequence {b(n + 1)/b(n)} n 0 assumes every positive rational value, each once and only once.. For all n 0, b(n) and b(n + 1) are relatively prime, so that the consecutive ratios are all reduced fractions. 3. b(n) is the number of partitions of the integer n into powers of, in which no power of is used more than twice. This material is based upon work supported by the National Science Foundation under Grant No. 060443. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect those of the National Science Foundation 1 Some authors take b(0) = 0 and continue as in (1), which complicates the partition connection and the generating function, while having no obvious advantages. 1

The sequence was discovered by M. A. Stern [6] in 1858, and it has been studied by many authors since. Its relation to partitions into powers of was discussed by Reznick [5]. Calkin and Wilf [1] derived the properties of the sequence from a presentation in the form of a binary tree, with a rational number sprouting at each node. In [], Mansour and Bates generalized the Calkin-Wilf tree to a q-tree, and showed that their tree defines a generating function for a refinement of the Stern sequence, namely to a new sequence {b(n,k)} n,k 0 which counts the partitions of n into powers of, no part used more than twice, and exactly k parts being used exactly twice. Here we study further properties of the b(n,k) s, and of their generating polynomials, which we call B n (t) = k b(n,k)tk. We will first, in order to illustrate the method, derive a fairly explicit formula for the original Stern sequence b(n), and second, we ll use the same method to find an explicit expression for b(n,k). We will then discuss which properties of the original Stern sequence carry over to the generalization {B n (t)}. A formula for b(n) Theorem 1 Let a(n) be the sum of the binary digits of n. For each i = 0,1,...,5 let Then b(n) = s 0 + s 1 s 3 s 4. We start with the generating function s i = {r : 0 r n and a(r) a(n r) i mod6}. B(x) = def n 0 b(n)x n = j 0 ( 1 + x j + x j+1). Now since we have 1 + u + u = (1 ωu)(1 ωu), (ω = e πi 3 ) B(x) = (1 ωx j ) ωx j 0 l 0(1 l ). However, in view of the uniqueness of the binary expansion we have zx j 0(1 j ) = ( z) a(n) x n, n 0 from which B(x) = ( ω) a(r) x r r 0 s 0( ω) a(s) x s. ()

The coefficient of x n here is, since ω = 1/ω, r+s=n ( ω) a(r) a(s) = 5 s j ( ω) j = s 0 s 1 ω + s ω s 3 ω 3 + s 4 ω 4 s 5 ω 5 j=0 = (s 0 s 3 ) + (s 4 s 1 )ω + (s s 5 )ω 5 (since ω 3 = 1) = (s 0 s 3 ) + (s 4 s 1 )(ω + ω) = s 0 + s 1 s 3 s 4, as required. Theorem 1 was first proved by Northshield [3], where it appears as Proposition 4.4. We remark that Theorem 1, when regarded as a method of computing the sequence {b(n) n 0 }}, is distinctly inferior to the well known divide-and-conquer recurrence for the sequence, which is eq. (8) below with t := 1. 3 A formula for b(n, k) We now will find a formula, that appears to be new, for b(n,k), the number of partitions of n into powers of, which have exactly k different powers of of multiplicity, the remaining parts being of multiplicity 1. A short table of this sequence is shown below. k\n 0 1 3 4 5 6 7 8 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 3 0 0 0 0 0 0 1 0 0 Theorem For b(n,k), the number of partitions of n into powers of which have exactly k different powers of of multiplicity, the remaining parts being of multiplicity 1, we have the formula b(n,k) = φ(k a(l),a(l) a(s)), l+s=n in which φ is given by (5) below, and a(m) is the sum of the binary digits of m. The generating function is obviously B(x,t) def = n,k 0b(n,k)x n t k = j 0 (1 + x j + tx j+1 ), (3) and we will treat it in the same way that the result of the previous section was obtained. First, ( 1 + u + tu = 1 u )( 1 u ), r + r 3

in which Therefore, since r r + = 1/t, r ± = r ± (t) = 1 ± 1 4t. (4) t B(x,t) = j 0(1 tr + x j )(1 tr x j ), from which, as in () above, we obtain B(x,t) = l 0 ( tr + ) a(l) x l m 0( tr ) a(m) x m. Thus the coefficient of x n is t a(l) ( r + ) a(l) a(m). l+m=n Next we have the well known series ( ) m 1 1 4t = φ(n,m)t n+m, n 0 where, for all integer m, we have 0, if n < 0; φ(n,m) = 1, if m = n = 0; m(n+m+1) n 1 n!, otherwise, (5) in which z r is the rising factorial. It follows that as required. b(n,k) = [t k ] = [t k ] = l+s=n l+s=n l+s=n µ 0 ( r + ) a(l) a(s) t a(l) φ(µ,a(l) a(s))t µ+a(l) φ(k a(l),a(l) a(s)), (6) 4

4 Some interesting polynomials Now we study the polynomials B n (t) = k 0 b(n,k)t k. (n = 0,1,,3,... ) These series, of course, terminate, and in fact it is easy to see that B n (t) is of degree at most log (1 + n/). If we multiply (6) by t k and sum over k 0 we find a quite explicit formula, viz. B n (t) = n l=0 in which a(m) is, as before, the sum of the bits of m. For example, ) a(n l) a(l) ( ) a(n l) a(l) 1 + 1 4t t a(l). (7) n ( 1 + 1 4t B 4 (t) = t a(l) l=0 ( ) ( ) ( ) 1 ( 1 + 1 4t 1 + 1 4t 1 + 1 4t 1 + 1 4t = t 0 + t + t + t + t = 1 + t, In the form (7) it might not be obvious that B n (t) is a polynomial, but note that the right-hand side of equation (7) is invariant under the automorphism defined by 1 4t 1 4t. Another representation of B n (t), which clearly shows its polynomial character, is given by Theorem 4 below. 5 A divide-and-conquer recurrence for the polynomials The generating function B(x,t) in (3) evidently satisfies (1 + x + tx )B(x,t) = B(x,t), ) 1 which is to say that (1 + x + tx ) n B n (t)x n = n B n (t)x n. If we match the coefficients of like powers of x on both sides, we find the recurrence B n (t) = B n (t) + tb n 1 (t), (n = 1,,3,... ) B n+1 (t) = B n (t), (n = 0,1,,... ) (8) 5

with B 0 (t) = 1. This sequence of polynomials begins as 1,1,t + 1,1,t + 1,t + 1,t + t + 1,1,3t + 1,t + 1,t + t + 1,t + 1,t + t + 1,.... From the recurrence (8) we obtain recurrences for the coefficients b(n,k), namely b(n,k) = b(n,k) + b(n 1,k 1), (n 1;k 1) (9) b(n + 1,k) = b(n,k). (n 0;k 0) (10) Now define the vertical generating functions C k (x) = n 0 b(n,k)xn. Multiply (9) by x n and sum over n 1, then add to the result of multiplying (10) by x n+1 and summing over n 0. The result is that C k (x) = (1 + x)c k (x ) + x C k 1 (x ). (k 1;C 0 (x) = 1/(1 x)) (11) Now in general, the solution of the functional equation is seen, by iteration, to be G(x) = (1 + x)g(x ) + F(x) (F(0) = 0) G(x) = 1 1 x (1 x j )F(x j ). j 0 If we apply this to the present case (11), we find a recurrence formula for the vertical generating functions {C k (x)} k=0, viz. With k = 1 we obtain C k (x) = j 0 1 x j 1 x xj+1 C k 1 (x j +1 ). (k 1; C 0 = 1/(1 x)) (1) C 1 (x) = 1 1 x j=1 x j. (13) j 1 1 + x The coefficient of x n in the power series expansion of C 1 (x), i.e., b(n,1), is the number of 0 s in the binary expansion of n (see [4], sequence #A080791) We state this as Theorem 3 The number of partitions of n into powers of in which exactly one part has multiplicity, the others being of multiplicity 1, is equal to the number of 0 digits in the binary expansion of n. These are the f(n; q) of []. 6

Proof #1. (Recurrence) In eq. (11) put k = 1, and compare the coefficients of x n on both sides, to obtain b(n,1) = b(n/,1) + b((n 1)/,1) + 1, with the usual convention that b(u,1) = 0 unless u is an integer. If z(n) is the number of 0 digits in the binary expansion of n, it is easy to check that z(n) satisfies this same recurrence with the same initial values. Proof #. (Bijection) Suppose that j does not appear in the binary expansion of n > j. Let k be the least integer for which k > j and k does appear. Then in the binary expansion of n, replace k with j + j + j+1 + j+ +... + k 1. An alternative method for computing C 1 (x) is to use the generating function B(x,t) def = n (t)x n 0B n = ( 1 + x j + tx j+1). j 0 Applying t and setting t = 0 yields equation (13). Similarly, applying 1 t and setting t = 0 yields 1 C (x) = x i+1 x i+ ( (1 x) 1 + x i i 0 i 0 1 + x i). Similar but more complicated formulas clearly exist for every C k (x). As a final remark, note that if we put t = 1 in (7) we recover another proof of Theorem 1. 6 Lucas polynomials The Lucas polynomials L n (t) can be defined as L n ( t) = u n + + u n. (14) For instance, L 1 (t) = 1 L (t) = 1 + t L 3 (t) = 1 + 3t L 4 (t) = 1 + 4t + t L 5 (t) = 1 + 5t + 5t 3 L 6 (t) = 1 + 6t + 9t + t 3 L 7 (t) = 1 + 7t + 14t + 7t 3 L 8 (t) = 1 + 8t + 0t + 16t 3 + t 4. 7

In particular, L n (1) = L n, a Lucas number. The Lucas polynomials have many equivalent definitions. For instance, the coefficient of t k in L n (x) is the number of k-edge matchings of an n-cycle. We also have the recurrence L n+1 (t) = L n (t) + tl n 1 (t), n. Equation (14) allows us to write a formula for B n (t) in terms of the Lucas polynomials. We write M n (t) = L n ( t) and omit the argument t for simplicity. Theorem 4 We have B n = M a(n) + (n 1)/ k=1 (n )/ ( Ma(k) M a(n k) M a(k)+a(n k) ), n odd ( ) M a(n) + Ma(k) M a(n k) M a(k)+a(n k) ( k=1 Ma(n/) M a(n/) + 1 ), n even. For instance, B 6 = M + (M M 1 M 3 ) + (M 1 M ) + 1 (M M 4 ) = (1 t) + t + t + 1 (t ) = 1 + t + t. Proof of Theorem 4. Note that a i b j + a j b i = (a i + b i )(a j + b j ) (a i+j + b i+j ). (15) In particular a i b i = 1 ( (a i + b i ) (a i + b i ) ). If we collect the terms of the rightmost sum of equation (7) indexed by l and n l, apply the identity (15), and use equation (14), the proof follows. Note that Theorem 4 expresses B n (t) as a nonnegative integer linear combination of the polynomials M k, M i M j M i+j (i j), and 1 (M k M k). If we set t = 1 in Theorem 4 then we get a formula for b(n). The sequence M 1 (1), M (1),... is periodic of period 6, and the resulting formula for b(n) is equivalent to Theorem 1. 7 Generalizations of the tree of fractions The Stern sequence, as we remarked earlier, has the property that the ratios b n /b n+1 of consecutive members run through the set of all positive reduced rational numbers, each occurring just once. In this section we look at the extent to which this property generalizes. That is, for fixed integer t 1, what can be said about the set S(t) of values that are assumed by the ratios {B n (t)/b n+1 (t)} n 0 of consecutive members? 8

7.1 Which fractions appear in the sequence? First, since all B n (t) are 1 mod t, S(t) can contain only fractions p/q for which p q 1 mod t. But it can t contain all of these, for, according to the recurrence (8), we have and B n (t) B n+1 (t) = 1 + tb n 1(t) > 1, B n (t) B n+1 (t) B n+ (t) = B n (t) B n+1 (t) + tb n (t) < 1/t. Thus, if t > 1, the ratios of consecutive polynomials can assume only rational values p/q such that p q 1 mod t, and p/q lies outside of the interval [1/t, 1]. We can, however, recover some of the structure of the Stern case t = 1, in general. 7. Are consecutive values relatively prime? Theorem 5 For fixed integer t 1 and for all n 0, B n (t) and B n+1 (t) are relatively prime. Proof. From the recurrence (8) we have that any common divisor d of B n (t) and B n+1 (t) must divide B n (t) and tb n 1 (t). But d must be relatively prime to t, for if p is a prime that divides d and t, then in view of B n (t) = 1 + k 1 b(n,k)t k, the left side is 0 mod p and right side is 1 mod p, a contradiction. Thus gcd(b n (t),b n+1 (t)) = gcd(b n (t),b n 1 (t)). On the other hand, the recurrences B n (t) = B n (t) + tb n 1 (t), (n = 1,,3,... ) B n 1 (t) = B n 1 (t), (n = 0,1,,... ) (16) imply that every common divisor d of B n (t) and B n 1 (t) must divide B n 1 (t) and B n (t) and conversely. Thus gcd(b n (t),b n 1 (t)) = gcd(b n (t),b n 1 (t)). Therefore the gcd of every consecutive pair is 1. 7.3 Can a pair of consecutive values recur? We can also recover the uniqueness of each ordered pair of consecutive values. Theorem 6 Each reduced positive rational number p/q can occur at most once in the sequence {B n (t)/b n+1 (t)} n=0. 9

Proof. Suppose that p/q occurs twice in the sequence. Say, to fix ideas, that B j (t) B j+1 (t) = p q = B i(t) B i+1 (t), with j < i and j chosen to be minimal among all such indices. Then from the recurrence (8) we have B j (t) + tb j 1 (t) = p;b j (t) = q;b i (t) + tb i 1 (t) = p;b i (t) = q. Therefore t divides p q and B j 1 (t) = (p q)/t;b j (t) = q;b i 1 (t) = (p q)/t;b i (t) = q. Hence the ratio of consecutive members is also repeated not only at the indices j and i, but also at j 1 and i 1, which contradicts the minimality of the chosen j. References [1] Neil Calkin and Herbert Wilf, Recounting the rationals, Amer. Math. Monthly, 107 (000), 360 363. [] Toufik Mansour and Bruce Bates, The q-calkin-wilf tree, preprint, 010. [3] Sam Northshield, Stern s diatomic sequence 0,1,1,,1,3,,3,1,4,..., Amer. Math. Monthly, 117, August-September 010, 581 598 [4] The On-Line Encyclopedia of Integer Sequences, published electronically at <http://oeis.org>, 010. [5] Bruce Reznick, Some binary partition functions, in Analytic Number Theory, Proceedings of a conference in honor of Paul T. Bateman, Birkhäuser, Boston (1990) 451 477. [6] M. A. Stern, Über eine zahlentheoretische Funktion, J. für die reine u. angew. Math. 55 (1858), 193 0. 10