Some Linear Recurrences Motivated by Stern's Diatomic Array
Richard P. Stanley

TL;DR
This paper introduces a new triangular array related to Stern's diatomic array, demonstrating that sums of powers of its entries follow linear recurrences with potential for explicit formulas and broad generalizations.
Contribution
It defines a novel array linked to Stern's array and proves that sums of powers satisfy linear recurrences, offering explicit cases and extensive generalizations.
Findings
Sum of r-th powers in the array satisfy linear recurrences
Explicit formulas obtained in special cases
Generalization of recurrence relations
Abstract
We define a triangular array closely related to Stern's diatomic array and show that for a fixed integer , the sum of the th powers of the entries in row satisfy a linear recurrence with constant coefficients. The proof technique yields a vast generalization. In certain cases we can be more explicit about the resulting linear recurrence.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Some Linear Recurrences Motivated by Stern’s Diatomic Array
Richard P. Stanley
Abstract
We define a triangular array closely related to Stern’s diatomic array and show that for a fixed integer , the sum of the th powers of the entries in row satisfy a linear recurrence with constant coefficients. The proof technique yields a vast generalization. In certain cases we can be more explicit about the resulting linear recurrence.
1 Introduction.
We first define an array of numbers analogous to Pascal’s triangle (or the arithmetic triangle). The rows will be numbered . The first row consists of a single 1, and every subsequent row begins and ends with a 1, just like Pascal’s triangle. We add two consecutive numbers in row and place the sum in row to the right of the first number and left of the second number, again just like Pascal’s triangle. However, we also bring down (copy) into row each entry in row , placing it directly below. The first four rows look like
[TABLE]
We will call this array Stern’s triangle, though “triangle” is somewhat of a misnomer since the number of entries in each row grows exponentially, not linearly.
Stern’s triangle is closely related to a well-known array called Stern’s diatomic array [7]. It has the same recursive rules as Stern’s triangle, but the first row consists of two 1’s which are brought down to form the first and last element of each row. It looks like
[TABLE]
Remark 1**.**
Let denote the th row of Stern’s diatomic array, beginning with row 0. Form the concatenation
[TABLE]
and then merge together the last 1 in each row with the first 1 in the next row. We then obtain row of Stern’s triangle. From this observation almost any property of Stern’s triangle can be carried over straightforwardly to Stern’s diatomic array and vice versa, including the properties that we discuss below. See in particular Remark 2.
We prefer Stern’s triangle to Stern’s diatomic array because its properties are more elegant and simple. In particular, let denote the th entry (beginning with ) in row of Stern’s triangle, in analogy with Pascal’s triangle. Naturally we define if is “out of range,” i.e., if or . We then have the following “Stern analogue” of the binomial theorem.
Theorem 1**.**
Let . Then
[TABLE]
Proof.
This formula is immediate from the recursive definition of Stern’s triangle. The result is clearly true for , so we need to show that , . The product accounts for the entries in row that are brought down from row , while accounts for the entries in row that are the sum of two consecutive entries in row . ∎
Note that it follows immediately from Theorem 1 that has the following combinatorial interpretation: it is the number of partitions of (as defined, e.g., in [1] or [5, §1.8]) into the parts , where each part may be used at most twice.
Theorem 1 implies that row of Stern’s triangle approaches a limiting sequence as , meaning that for all we have for sufficiently large (depending on ). Moreover, letting in equation (1) shows that
[TABLE]
The sequence is the famous Stern’s diatomic sequence, with many remarkable properties. (Sometimes is called Stern’s diatomic sequence.) Perhaps the most amazing property, though irrelevant here, is that every positive rational number appears exactly once as a ratio , and that this fraction is always in lowest terms. Northshield [2] has a nice survey.
2 Sums of products of powers.
In this section we will consider sums , where , and more generally
[TABLE]
where . For notational simplicity we write as short for .
We will use the following terminology concerning linear recurrences with constant coefficients. Suppose that satisfies such a recurrence for . Thus there are complex numbers , with , such that
[TABLE]
Equivalently, has a generating function of the form
[TABLE]
where and . We say that has a rational generating function with characteristic polynomial
[TABLE]
Thus if denotes the denominator of the right-hand side of equation (2), then . For further information on linear recurrences with constant coefficients and rational generating functions, see [5, Chapter 4].
Clearly the number of entries in row of Stern’s triangle is , so . It is also clear that , e.g., by putting in equation (1) or directly from the recursive structure of Stern’s triangle, since each entry in row contributes to three entries of row .
Thus let us turn to . The first few values (beginning at ) are 1, 3, 13, 59, 269, 1227, 5597, 25531,. By various methods, such as trial-and-error, using the Online Encyclopedia of Integer Sequences (OEIS) , or using the Maple package gfun, we are led to conjecture that
[TABLE]
Equivalently (using the initial values and ),
[TABLE]
Note the difference from Pascal’s triangle, where and . For Stern’s triangle the generating function is rational, while for Pascal’s triangle it is only algebraic.
How do we prove the recurrence (3)? From the definition of Stern’s triangle we have
[TABLE]
We therefore need to play a similar game with :
[TABLE]
Hence we get the matrix recurrence
[TABLE]
where A=\left[\begin{array}[]{cc}3&2\\ 2&2\end{array}\right]. This is a standard type of simultaneous linear recurrence. To solve it, we have
[TABLE]
The minimum polynomial of , i.e., the (nonzero) monic polynomial of least degree satisfying , is easily computed to be . Hence
[TABLE]
so we get , as well as the same recurrence for .
Let us apply this procedure to . We get
[TABLE]
Because of the symmetry of Stern’s triangle about a vertical axis, we have
[TABLE]
so in particular . Thus
[TABLE]
Similarly,
[TABLE]
The matrix \left[\begin{array}[]{cc}3&6\\ 2&4\end{array}\right] has minimum polynomial , so we get the recurrence
[TABLE]
and similarly for . (The recurrence is not valid at since the minimum polynomial is , not .) In fact, we have the surprisingly simple formulas
[TABLE]
Here we see an even larger divergence from the behavior of Pascal’s triangle—the generating function for is not even algebraic. The best we can say is that it is D-finite [6, §6.4], meaning that satisfies a linear recurrence with polynomial coefficients, namely,
[TABLE]
For more on the sums , see [6, Exercise 6.54] and the references given there.
We have shown that , and have rational generating functions. The same technique yields the following general result.
Theorem 2**.**
For any , the function has a rational generating function.
Proof.
We have
[TABLE]
When the summands are expanded, we obtain an expression for as a linear combination of ’s. Define the spread of , denoted , to be largest length (number of terms) of any for which appears in this expression for . For instance, from we see that , coming from of length two.
From equation (9) we see that that when is written as a linear combination of ’s, the indices that occur satisfy (a) , and (b) , where has length . Since for , it follows that for we will obtain a (finite) matrix recurrence like equation (4), where one of the functions is . The size (number of rows or columns) of the matrix is , the number of weakly decreasing sequences of positive integers with sum and length 1 or 2. Similarly, when has length , then the size of the matrix will not exceed the number of equivalence classes of sequences of nonnegative integers of length at most summing to , where a sequence is equivalent to its reverse. The point is that there are only finitely many such equivalence classes, so we obtain a finite matrix equation. By the same argument used to show , we get that has a rational generating function. ∎
Here are the characteristic polynomials of the recurrences satisfied by for sufficiently large (denoted ), for :
[TABLE]
We can say quite a bit more about the recurrence satisfied by . We can assume that with and . We then write , the length of .
Write (for “matrix minimum polynomial”) for the minimum polynomial of the matrix used to compute by the method above. Write (for “recurrence minimum polynomial”) for the characteristic polynomial of the linear recurrence with constant coefficients of least degree satisfied by for . Note that the proof of Theorem 2 shows that is divisible by .
Linearly order all sequences with and , and where is fixed, in such a way that the following conditions are satisfied: (a) if then ; and (b) if and (with ), then define if , , and . (We do not specify the ordering when except for condition (a).)
Order the rows and columns of using the order defined in the previous paragraph. It is easy to check that is block lower-triangular. The first block is , where . This corresponds to rows and columns indexed by with . For , the blocks are with entry 1. All the other blocks are with entry 0.
Example**.**
For we use the ordering (writing e.g. 121 for )
[TABLE]
(No other ’s occur in computing the recurrence satisfied by .) We get the matrix
[TABLE]
In particular, the minimum polynomial of is . The factor is the minimum polynomial of the block . The characteristic polynomial of the least order recurrence satisfied by for turns out to be .
The above argument yields the following theorem.
Theorem 3**.**
Let and . Then the polynomial has the form for some .
We have not considered whether there is a “nice” description of the integers and , nor the largest power of dividing .
3 A conjecture on the order of the recurrence.
Can we say more about the actual recurrence satisfied by ? We have not investigated this question systematically, but we do have a conjecture about the order of the recurrence and some special properties of the characteristic polynomial. For instance, is it just an “accident” that the matrix A_{3}=\left[\begin{array}[]{cc}3&6\\ 2&4\end{array}\right] has a zero eigenvalue, thereby reducing the order of the recurrence from two to one? Or that the polynomials , , and , are divisible by ?
We noted before that the matrix has size (the number of weakly decreasing sequences of positive integers with sum and length 1 or 2) so satisfies a linear recurrence with constant coefficients of this order. However, on the basis of empirical evidence (), we conjecture that the least order of such a recurrence is actually . In fact, we have the following more precise conjecture. Write for the periodic function satisfying if . Let denote the number of eigenvalues of equal to . Recall that an eigenvalue of a matrix is semisimple if the minimum polynomial of is not divisible by . Equivalently, all the Jordan blocks with eigenvalue of the Jordan canonical form of have size one.
Conjecture**.**
- (a)
We have
[TABLE]
and the eigenvalue 0 is semisimple. There are no other multiple eigenvalues, and 1 is not an eigenvalue. 2. (b)
We have
[TABLE]
The eigenvalues and are semisimple, and there are no other multiple eigenvalues.
Let be the minimum order of a linear recurrence with constant coefficients satisfied by for . Conjecture Conjecture reduces the “naive” bound to when is odd, and
[TABLE]
when is even. However, it appears that the eigenvalue 1 of is always superfluous, that is, is not a factor of the characteristic polynomial . This will lower the upper bound for by 1 when . The evidence suggests that we then get a best possible result. The resulting conjecture is the following.
Conjecture**.**
We have , , and otherwise
[TABLE]
After the above conjectures were communicated in a lecture, David Speyer [4] made some important progress. He showed that the conjectured values of and are lower bounds for their actual values. Moreover, can be conjugated by a diagonal matrix to give a symmetric matrix, thereby showing that the eigenvalues of are semisimple (and real). As a consequence, the conjectured value of is an upper bound on its actual value. The key to Speyer’s argument is that if is defined like the matrix except that we don’t take into account the symmetry , then is the matrix of the linear transformation , with respect to the basis of monomials, defined by
[TABLE]
where is the vector space of complex homogeneous polynomials of degree in the two variables and . We will not give further details here.
Remark 2**.**
Let be the analogue for Stern’s diatomic array of . That is, if denotes the th entry (beginning with ) in row (beginning with ) in Stern’s diatomic array, then
[TABLE]
where .
Write and . It follows from Remark 1 that
[TABLE]
Write for the characteristic polynomial of the linear recurrence with constant coefficients of least degree satisfied by for . If the empirical observation above, that is not divisible by , holds, then it follows from equation (10) that .
4 A generalization.
A much more general result can be proved by exactly the same method. Let and be any complex polynomials, and let be an integer. Define
[TABLE]
Let . If
[TABLE]
then set
[TABLE]
Theorem 4**.**
For fixed and , the function has a rational generating function.
Proof.
Just as in the previous section we can express as a linear combination of ’s. If actually appears (i.e., has a nonzero coefficient), then call a child of . Successive children of are called descendants of . The only issue is whether has only finitely many descendants. It is clear that all the descendants satisfy .
In the previous section we observed that if has length , then , so that we can take . In the present situation, we can assume that and . Let . If has length , then
[TABLE]
(The precise formula is irrelevant. One just needs to see that if increases by then the spread increases by 1.) Since , for sufficiently large we will have
[TABLE]
showing that has finitely many descendants. ∎
Note that the above proof breaks down for Pascal’s triangle, as it should. For then , so the inequality (11) does not hold for sufficiently large .
Remark 3**.**
There is a straightforward multivariate generalization of Theorem 4. The polynomials and are replaced by complex multivariate polynomials and , and is replaced by integers . We define
[TABLE]
and the development proceeds as before. Details are omitted. As some random examples, extend the definition of to , where . Then
[TABLE]
Compare with the univariate analogue , where for instance
[TABLE]
The reason for this nice factorization is discussed in the next section.
5 A special case.
A natural problem is to say more about the recurrence (or equivalently its characteristic polynomial) satisfied by in general, or at least in special situations. In this section we give one such result.
For simplicity we first consider the case , , , and . We then state a more general result that is proved by exactly the same technique.
Theorem 5**.**
For we have
[TABLE]
for certain rational constants (depending on ).
Proof.
The key to the proof is the simple and well-known identity
[TABLE]
Thus
[TABLE]
Let us consider more generally the generating function
[TABLE]
Now
[TABLE]
Since is a polynomial in of degree , we get
[TABLE]
Let
[TABLE]
The binomial coefficient is a polynomial in of degree two. For any polynomial of degree , the sum is a polynomial of degree , so the same is true of , etc. Hence is a polynomial of degree at most , say . Then,
[TABLE]
It remains to prove that if is even. The coefficient of in is 0 for , so
[TABLE]
for . The left-hand side is a polynomial in and . Since it is 0 for , it must be 0 as a polynomial in and .
In general, for integers and any function , we have
[TABLE]
If we want to define for integers so that equation (14) is valid for all integers , then we will have the identity
[TABLE]
It is easy to check (using the fact that if two univariate complex polynomials agree for infinitely many values, then they are the same polynomial) that if
[TABLE]
for polynomials (so is also a polynomial), then indeed we have
[TABLE]
Write the polynomial of equation (12) as , corresponding to the three sums. If we substitute for in
[TABLE]
then we get
[TABLE]
From equation (13) there follows
[TABLE]
Hence is an odd polynomial, i.e.,
[TABLE]
so all powers of appearing in this polynomial have odd exponents.
In exactly the same way, this time using equation (13) in the form
[TABLE]
we obtain that . Thus , completing the proof. ∎
The reader who has followed the previous proof should have no trouble extending it to the following more general result. We only point out one possible subtlety: when is even in the theorem below, the polynomial has an odd number of terms. Hence the analogue of the equation becomes . Thus is an even polynomial when is even and is odd.
Theorem 6**.**
- (a)
Let , , and . For any and we have
[TABLE]
where . 2. (b)
If , and either is even or is odd, then when is even. 3. (c)
If , , is odd, and is even, then when is odd.
We leave as an open problem to see to what extent Theorem 6 can be generalized.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Andrews, G. E. (1998). The Theory of Partitions . Cambridge: Cambridge Univ. Press.
- 2[2] Northshield, S. (2010). Stern’s diatomic sequence 0 , 1 , 1 , 2 , 1 , 3 , 2 , 3 , 1 , 4 , … 0 1 1 2 1 3 2 3 1 4 … 0,1,1,2,1,3,2,3,1,4,\dots . Amer. Math. Monthly . 117(7): 581–598.
- 3[3] OEIS Foundation Inc. (2019). The On-Line Encyclopedia of Integer Sequences , oeis.org.
- 4[4] Speyer, D. E. (2018). Proof of a conjecture of Stanley about Stern’s array, preprint.
- 5[5] Stanley, R. P. (2012). Enumerative Combinatorics, vol. 1 , 2nd ed. New York/Cambridge, Cambridge Univ. Press.
- 6[6] Stanley, R. P. (1999). Enumerative Combinatorics, vol. 2 . New York/Cambridge: Cambridge Univ. Press.
- 7[7] Stern, M. A. (1858). Ueber eine zahlentheoretische Funktion. J. Reine Angew. Math. 55: 193–220.
