Integer Sequences Related to Compositions without 2’s

Phyllis Chinn Department of Mathematics Humboldt State University Arcata, CA 95521 USA

               phyllis@math.humboldt.edu

Silvia Heubach Department of Mathematics California State University, Los Angeles Los Angeles, CA 90032 USA

                sheubac@calstatela.edu

Abstract

A composition of a positive integer n consists of an ordered sequence of positive integers whose sum is n. We investigate compositions in which the summand 2 is not allowed, and count the total number of such compositions and the number of occurrences of the summand i in all such compositions. Furthermore, we explore patterns in the values for C_{j}(n, ˆ2), the number of compositions of n without 2’s having j summands, and show connections to several known sequences, for example the ndimensional partitions of 4 and 5.

1 Introduction

Adding whole numbers seems like one of the most basic ideas in all of mathematics, but many unanswered questions remain within this area of combinatorial number theory. A broad class of questions relate to compositions and partitions. A composition of n is an ordered collection of one or more positive integers for which the sum is n. The number of summands is called the number of parts of the composition. A palindromic composition or palindrome is one for which the sequence is the same from left to right as from right to left. A partition of n is an unordered collection of one or more positive integers whose sum is n.

Compositions may also be viewed as tilings of a 1-by-n board with 1-by-k tiles, 1 ≤ k ≤ n. Figure 1 shows the compositions of 3 together with corresponding tilings of the 1-by-3 board using 1-by-1, 1-by-2 and 1-by-3 tiles.

1 + 1 + 1  1 + 2 2 + 1  3

Figure 1: The compositions of 3 and their corresponding tilings

In this view, a palindromic composition corresponds to a symmetric tiling, e.g., the tilings corresponding to 1+1+1 and 3 in Figure 1. One reason to adopt the tiling viewpoint for compositions is that some counting questions about compositions arise more naturally in the context of tilings. More examples of the interrelation between compositions and tilings can be found in [4, 5, 6, 7, 9].

In [9], Grimaldi explores the question of how many compositions of n exist when no 1’s are allowed in the composition. In this paper we explore a related question, namely, how many compositions of n exist when no 2’s are allowed in the composition. We also look at how many of these compositions are palindromes.

We count the total number of compositions and explore patterns involving the number of compositions with a fixed number of parts and the total number of occurrences of each positive integer among all the compositions of n without occurrences of 2. In the viewpoint of tilings, these questions correspond to counting the total number of tilings, the number of tilings with a fixed number of tiles and the number of times a tile of a particular size occurs among all the tilings of the 1-by-n board that do not contain any 1-by-2 tiles. Next, we count the number of palindromes of n without any occurrence of 2, which correspond to symmetric tilings with no 1-by-2 tiles. Finally, we give a table of values for the number of partitions of n that do not contain any occurrence of 2. We use the following notation:

C(n, ˆ2) = the number of compositions of n with no 2’s
C_{j}(n, ˆ2) = the number of compositions of n with no 2’s having exactly
j parts
x(n, i, ˆ2) = the number of occurrences of i among all compositions of
n with no 2’s
P (n, ˆ2) = the number of palindromes of n with no 2’s
π(n, ˆ2) = the number of partitions of n with no 2’s.

Because we consider only compositions and palindromes of n with no 2’s in this paper, we sometimes leave out the qualifier “with no occurrence of 2’s”.

2 The number of compositions without 2’s

We start by counting the total number of compositions.

Theorem 1 The number of compositions without occurrence of 2’s is given by

C(n, ˆ2) = 2 · C(n − 1, ˆ2) − C(n − 2, ˆ2) + C(n − 3, ˆ2)

with initial conditions C(0, ˆ2) = C(1, ˆ2) = C(2, ˆ2) = 1, and generating function

G_{C}(z) = ∑_{n=0}^{∞} C(n, ˆ2)z^{n} = \frac{1 − z}{1 − 2z + z^{2} − z^{3}} .

Proof. The compositions of n without 2’s can be generated recursively from those of n − 1 by either appending a 1 or by increasing the last summand by 1. However, this process does not generate those compositions ending in 3, which we generate separately by appending a 3 to the compositions of n − 3. Furthermore, we must delete the compositions of n − 1 that end in 1, since increasing the terminal 1 would produce a composition of n that ends in 2. The number of such compositions corresponds to the number of compositions of n − 2. The generating function G_{C}(z) is computed by multiplying each term in the recurrence relation by z^{n}, and summing over n ≥ 3. Expressing the resulting series in terms of G_{C}(z) and solving for G_{C}(z) gives the result.

The following table gives some values of C(n, ˆ2):

\begin{matrix}n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 \\ C(n, ˆ2) & 1 & 1 & 1 & 2 & 4 & 7 & 12 & 21 & 37 & 65 & 114 & 200 & 351 \end{matrix}

Table 1: The number of compositions with no occurrence of 2

The sequence C(n, ˆ2) appears as A005251 in Sloane’s On-Line Encyclopedia of Integer Sequences [10], with representation a(n) = a(n − 1) + a(n − 2) + a(n − 4). Two alternative formulas are given for this sequence:

a(n) = 2 · a(n − 1) − a(n − 2) + a(n − 3)  (1)

and

a(n) = ∑_{j<n} a(j) − a(n − 2).  (2)

Eq. (1) is identical to the expression for C(n, ˆ2) in Theorem 1, while Eq. (2) indicates a second way to create all the compositions with no 2’s, namely, to append the summand j to a composition of n − j, except when j = 2. Comparison of the initial conditions (a(0) = 0, a(1) = a(2) = a(3) = 1) shows that C(n, ˆ2) = a(n + 1).

One interpretation of sequence A005251 is the number of binary sequences without isolated 1’s [2]. There is a nice combinatorial explanation for the equality of the two different counts, namely, the number of compositions of n without 2’s and the number of binary sequences of n-1 without isolated 1’s. Think of the composition as a tiling of the 1-by-n board. Associate a binary sequence of length n-1 with the interior places where a tile can start or end. If the binary sequence has a 0 in position k, then a tile ends or starts at position k, whereas a 1 indicates that the tile “continues”. With this interpretation, isolated 1’s, which appear as … 010 … correspond to a 1-by-2 tile, as illustrated in Figure 2.

0 0 1 0 0 1 1 0 0

Figure 2: Correspondence of binary sequences and compositions

3 The number of occurrences of the summand i in all compositions with no 2’s

Table 2 gives values of x(n, i, ˆ2) for 1 ≤ n ≤ 10 and 1 ≤ i ≤ 10. We note that the entries in the columns appear to repeat. Theorem 2 shows that this repetition indeed continues.

i = 1 2 3 4 5 6 7 8 9 10
n = 1 1
2  2 0
3  3 0 1
4  6 0 2 1
5  13 0 3 2 1
6  26 0 6 3 2 1
7  50 0 13 6 3 2 1
8  96 0 26 13 6 3 2 1
9  184 0 50 26 13 6 3 2 1
10  350 0 96 50 26 13 6 3 2 1

Table 2: The number of occurrences of i among all compositions of n

Theorem 2 x(n, i, ˆ2) = x(n + j, i + j, ˆ2) for all i ≠ 2, i + j ≠ 2.

Proof. Consider any occurrence of the summand i among the compositions of n without 2’s. There is a corresponding occurrence of i + j in a composition of n + j in which the summand i has been replaced by i + j and all other summands are the same, as long as i + j ≠ 2. This correspondence is actually one-to-one since any occurrence of i + j among the compositions of n + j corresponds to an occurrence of i among the compositions of n obtained by replacing i + j by i, subject to the condition that i ≠ 2.

As a result of Theorem 2, we only need to generate the first column of Table 2, namely the number of occurrences of 1 among all the compositions of n without 2’s, a sequence not previously listed in Sloane’s On-Line Encyclopedia of Integer Sequences [10]. We will give three different ways to generate this sequence.

Theorem 3 The number of occurrences of 1 among all compositions of n without 2’s is given by

x(n, 1, ˆ2) = 2 · x(n − 1, 1, ˆ2) − x(n − 2, 1, ˆ2) + x(n − 3, 1, ˆ2)
+C(n − 1, ˆ2) − C(n − 2, ˆ2)  (3)

with initial conditions x(n, 1, ˆ2) = n for n = 1, 2, 3, or by

x(n, 1, ˆ2) = n · C(n, ˆ2) − ∑_{i=1}^{n−2}(n − i + 1) · x(i, 1, ˆ2).  (4)

The generating function G_{x}(z) = ∑_{n=1}^{∞} x(n, 1, ˆ2)z^{n} is given by

G_{x}(z) = \frac{z(1 − z)^{2}}{(1 − 2z + z^{2} − z^{3})^{2}} = zG_{C}(z)^{2},  (5)

thus, x(n, 1, ˆ2) = ∑_{i=0}^{n−1} C(i, ˆ2)C(n − 1 − i, ˆ2).

Proof. Eq. (3) is based on the creation of the compositions of n from those of n − 1 by either adding a 1 or by increasing the rightmost summand by 1. When adding a 1, we get all the “old” 1’s, and for each composition an additional 1, altogether x(n−1, 1, ˆ2)+C(n−2, ˆ2) 1’s. When increasing the rightmost summand by 1, again we get all the “old” 1’s (of which there are x(n − 1, 1, ˆ2) ), except that we need to make adjustments for those compositions of n − 1 with terminal summand 1, since they would result in a forbidden 2, and the otherwise missing compositions of n that end in 3. The latter have x(n − 3, 1, ˆ2) 1’s, which need to be added to the total count, while the 1’s in the compositions of n − 1 with a terminal 1 need to be subtracted. To determine how many of these 1’s there are, we look at the composition of n − 1 as consisting of a composition of n − 2 and the terminal 1, i.e., we distinguish between “interior” 1’s (those to the left of the terminal 1) and the terminal 1. The interior 1’s correspond to all the 1’s in the compositions of n − 2. In addition, there is one terminal 1 for each composition of n − 2. Thus, we subtract a total of x(n − 2, 1, ˆ2) + C(n − 2, ˆ2) 1’s from the total count. Simplification gives the stated result.

The derivation of Eq. (4) is based on a geometric argument involving all tilings of a 1-by-n board. The total area of all these tilings, given by n · C(n, ˆ2), has to equal the sum of the areas covered by 1-by-1, 1-by-2,…, and 1-by-n tiles. The area covered by 1-by-k tiles is given by k · x(n, k, ˆ2), and thus, n · C(n, ˆ2) = ∑_{k=1}^{n} k · x(n, k, ˆ2). Since x(n, 2, ˆ2) = 0, we can rewrite this equation as

x(n, 1, ˆ2) = n · C(n, ˆ2) − ∑_{k=3}^{n} k · x(n, k, ˆ2).  (6)

Note that Eq. (6) relates the first entry in any row of Table 2 to all the other entries in the same row, which in turn show up in column 1 in “reverse” order: the rightmost non-zero element in any row equals the first element in column 1, the second element from the right in any row equals the second element in column 1, etc. We can formalize this association using the formula given in Theorem 2 (for i = 1): x(m, 1, ˆ2) = x(m+j, j +1, ˆ2). We now choose m and j so that we get the terms that appear on the right-hand side of Eq. (6). This requires that k = j +1 and n = m+j , so using m = n−k +1 results in x(n−k +1, 1, ˆ2) = x(n, k, ˆ2). Substituting this equality into Eq. (6) and reindexing gives the second recurrence relation for x(n, 1, ˆ2). Finally, the generating function G_{x}(z) is computed as in the proof of Theorem 1, except that we now sum over n ≥ 4 and express the resulting series in terms of G_{x}(z) and G_{C}(z). Note that the last equality in Eq. (5) indicates that the terms for the sequence {x(n, 1, ˆ2)} are a convolution of those of the sequence {C(n, ˆ2)} , with the index shifted by 1. The formula for x(n, 1, ˆ2) in terms of the C(i, ˆ2) follows immediately from this observation.

4 The number of compositions without 2’s having a given number of parts

Another question one can ask about compositions is how many of them have a given numbers of parts, i.e., a given number of summands. Table 3 gives the number of compositions of n without 2’s that have j parts.

The values in Table 3 are generated using the recursion given in Theorem 4, which relates the entries in the j^{th} column to those in the (j − 1)^{st} column.

Theorem 4 C_{j}(n, ˆ2) = ∑_{k=1}^{n−1} C_{j−1}(n − k, ˆ2) − C_{j−1}(n − 2, ˆ2).

Proof. For any composition of n − k having j − 1 parts, we can form a composition of n having j parts by adding the summand k to the end of the smaller composition, except for k = 2. This increases the number of parts by one as required.

We will now look at the patterns in the columns and diagonals of Table 3. The patterns in the left two columns clearly continue, since they correspond, respectively, to the single composition with one part, namely n, and the n − 3 ways (for n > 4) to add two numbers (without using a 2) to get n. None of the remaining columns in Table 3 show any obvious pattern and they do not (yet) occur in [10].

Unlike the columns, the diagonals contain a rich set of patterns and show many connections to known integer sequences. For the entry in row n and column j in the k^{th} diagonal, we have n − j = k − 1, and thus the entries in the k^{th} diagonal are given by

j = 1 2 3 4 5 6  7  8  9 10 11
n = 1 1
2  0  1
3  1  0 1
4  1  2 0 1
5  1  2 3 0 1
6  1  3 3 4 0 1
7  1  4 6 4 5 0  1
8  1  5 9 10 5 6  0  1
9  1  6 13 16 15 6  7  0  1
10  1  7 18 26 25 21 7  8  0 1
11  1  8 24 40 45 36 28  8  9 0 1
12  1  9 31 59 75 71 49 36 9 10 0
13  1 10 39 84 120 126 105 64 45 10 11
14  1 11 48 116 185 216 196 148 81 55 11
15  1 12 58 156 276 356 357 288 201 100 66
16  1 13 69 205 400 567 623 554 405 265 121
17  1 14 81 264 565 876 1050 1016 819 550 341

Table 3: The number of compositions of n with j parts

C_{j}(n, ˆ2) = C_{j}(j + k − 1, ˆ2). We will look at the possible compositions of n having j parts by creating a composition of n = j + k − 1 as follows: we start with j 1’s (as there are to be j parts), and then distribute the difference n−j = k −1 across these j parts, adding to the 1’s that are already there, as illustrated in the following example. Consider the compositions of n = 4 having j = 2 parts which can be generated as follows: first create two 1’s, resulting in the composition 1+1. Then distribute the difference n − j = 2 , i.e., consider all the partitions of 2, namely {2} and {1, 1}. Using the first partition leads to 3+1 (the first 1 is increased by 2) or 1+3 (the second 1 is increased by 2), and the second partition creates 2+2 (both 1’s are increased by 1). The latter composition is not allowed as it contains 2’s, so we have to disregard all the partitions of n − j that contain a 1.

Now we can look at the diagonals in general, using this method to create and count the compositions of n having a given number of parts.

Theorem 5 1. C_{j}(j, ˆ2) = 1 (first diagonal)

2. C_{j}(j + 1, ˆ2) = 0 (second diagonal)

3. C_{j}(j + 2, ˆ2) = C_{j}(j + 3, ˆ2) = j (third and fourth diagonals).

Proof. The first diagonal corresponds to the compositions of all 1’s, the only way to have n parts in a composition of n. For the second diagonal, k = 2 and thus n − j = 1. The only partition of 1 is itself, but this partition has to be excluded, so there are no compositions of n (without 2’s) having n − 1 parts. On the third diagonal, k = 3 and n − j = 2. This is exactly the example described above (for j = 2). Thus, the only partition for distributing the difference between n and j is the single 2. Since there are j parts, there are exactly j possible compositions (with a single 3 and j − 1 1’s). For the fourth diagonal, a similar argument applies, as the only partition of 3 without 1’s is the single 3, so there are again j possible compositions (with a single 4 and j − 1 1’s).

The next few diagonals contain more interesting sequences.

Theorem 6 1. C_{j}(j+4, ˆ2) = j(j+1)/2, i.e., the triangle numbers occur in the fifth diagonal.

2. C_{j}(j + 5, ˆ2) = j^{2}, i.e., the square numbers occur in the sixth diagonal.

Proof. For k = 5, we need to distribute n − j = 4. The partitions of 4 that do not contain a 1 are {4} and {2, 2}. There are j ways to place the additional 4 and j(j − 1)/2 ways to allocate the two 2’s. Thus, C_{j}(j + 4, ˆ2) = j + j(j − 1)/2 = j(j + 1)/2. For k = 6, we need to distribute n − j = 5. The partitions of 5 that do not contain a 1 are {5} and {3, 2}, and there are j possibilities for the first partition and j(j − 1) for the second. Altogether, we have C_{j}(j + 5, ˆ2) = j + j(j − 1) = j^{2}.

Theorem 7 The seventh diagonal contains the n-dimensional partitions of 4.

Proof. For k = 7 , we need to distribute n − j = 6. The partitions of 6 that do not contain a 1 are {6}, {4, 2}, {3, 3} and {2, 2, 2}. There are j compositions for the first partition, j(j − 1) for the second, j(j − 1)/2 for the third, and j(j − 1)(j − 2)/6 for the fourth. Adding these terms and simplifying shows that

C_{j}(j + 6, ˆ2) = j(j^{2} + 6j − 1)/6.

The sequence C_{j}(j + 6, ˆ2) appears as A008778 in Sloane’s On-Line Encyclopedia of Integer Sequences [10]. A008778 is defined by

a(n) = (n + 1)(n^{2} + 8n + 6)/6

and counts the n-dimensional partitions of 4 (for a definition see [1], p. 179). We need to show the equivalence of the sequences a(n) and C_{j}(j + 6, ˆ2) for a suitable value of n. The formulas for these two sequences suggest that C_{j}(j +6, ˆ2) = a(j −1), which can be confirmed by basic algebraic manipulations.

Theorem 8 The eighth diagonal contains the pentagonal pyramidal numbers.

Proof. For k = 8, we need to distribute n − j = 7. The partitions of 7 that do not contain a 1 are {7}, {5, 2}, {4, 3} and {3, 2, 2}. These correspond, respectively, to the following number of compositions: j, j(j − 1), j(j − 1), and j(j − 1)(j − 2)/2. Adding these terms and simplifying shows that

C_{j}(j + 7, ˆ2) = j^{2}(j + 1)/2.

The sequence C_{j}(j + 7, ˆ2) appears as A002411 in Sloane’s On-Line Encyclopedia of Integer Sequences [10]. A002411 is defined by

a(n) = n^{2}(n + 1)/2

and counts the pentagonal pyramidal numbers (for a definition see [3], pp. 193-195). Clearly, C_{j}(j + 7, ˆ2) = a(j).

Theorem 9 The ninth diagonal contains the n-dimensional partitions of 5.

Proof. For k = 9, we need to distribute n − j = 8. The partitions of 8 that do not contain a 1 are {8}, {6, 2}, {5, 3}, {4, 4}, {4, 2, 2}, {3, 3, 2} and {2, 2, 2, 2} and together generate a total of

j + 2j(j − 1) + \binom{j}{2} + 2j\binom{j − 1}{2} + \binom{j}{4} = j + 5\binom{j}{2} + 6\binom{j}{3} + \binom{j}{4}

compositions. C_{j}(j + 8, ˆ2) appears as A008779 in Sloane’s On-Line Encyclopedia of Integer Sequences [10]. A008779 is defined by

a(n) = 1 + 6n + 11\binom{n}{2} + 7\binom{n}{3} + \binom{n}{4}

and counts the n-dimensional partitions of 5 (for a definition see [1], p. 179). We need to show the equivalence of the sequences a(n) and C_{j}(j + 8, ˆ2) for a suitable value of n. Replacing j by j + 1 in the expression derived above for C_{j}(j + 8, ˆ2) and simplifying shows that C_{j+1}((j + 1) + 8, ˆ2) = a(j), i.e., C_{j}(j + 8, ˆ2) = a(j − 1), similar to the case k = 7.

Remark. The n-dimensional partitions of 4 and 5 are not the only ones contained in the diagonals of Table 3. Further study shows that the n-dimensional partitions of 2 and 3 also occur on the diagonals. In [1], formulas for the n-dimensional partitions of k are given for k ≤ 6. The n-dimensional partitions of 2 are given as a(n) = n + 1, which is the sequence in the 3^{rd} diagonal: C_{j}(j + 2, ˆ2) = a(j − 1). The n-dimensional partitions of 3 are given as a(n) = 1 + 2n + n(n − 1)/2 , and simple algebraic manipulation shows that this sequence appears on the 5^{th} diagonal: C_{j}(j + 4, ˆ2) = a(j − 1). A pattern emerges: for odd k, the k^{th} diagonal contains the n-dimensional partitions of (k + 1)/2. This conjecture was very exciting because no generating function exists for this family; if a nice connection could be established, then one could compute the n-dimensional partitions in a simple way, using Theorem 4. However, the pattern does not continue: the sequence for the n-dimensional partitions of 6, namely, {11, 48, 140, 326, 657, 1197, …}, which should have appeared in the 11^{th} d iagonal, does not show up. Nor does this sequence appear in the 13^{th} diagonal, the only one that has 11 as the second element.

5 The number of palindromes with no 2’s

As a last exploration, let us consider the number of palindromes of n with no 2’s. Table 4 lists the actual palindromes for the first few values of n.

In the following theorem, we give recursive formulas and the generating function for P (n, ˆ2).

Theorem 10 The number of palindromes of n without 2’s is given by

P (n, ˆ2) = \{ \begin{matrix}C(k + 1, ˆ2), & for n = 2k, k ≥ 0; \\ C(k + 1, ˆ2) + C(k − 1, ˆ2), & for n = 2k + 1, k ≥ 0, \end{matrix}

with generating function G_{P} (z) = ∑_{n=0}^{∞} P (n, ˆ2)z^{n} = \frac{1 + z}{1 − z^{2} − z^{3}} .

n  1 2  3  4  5
Palindromes 1 1 + 1 1 + 1 + 1 1 + 1 + 1 + 1 1 + 1 + 1 + 1 + 1
of n 3 4 1 + 3 + 1
with no 2’s  5

Table 4: Palindromes of n with no 2’s

Proof. In general, for odd n, begin with any odd number 1 ≤ m ≤ n as a middle entry and fill in the left side of the palindrome of n with any composition of (n − m)/2 = j that has no 2’s and complete the right side of the palindrome of n with the composition of j in opposite order. The total number of such palindromes is given by P (2k + 1, ˆ2) = ∑_{j=0}^{k} C(j, ˆ2) = C(k + 1, ˆ2) + C(k − 1, ˆ2). For even n, we must omit the palindromes that are formed with a 2 in the middle, but do allow an even split, i.e., no middle term. Thus, P (2k, ˆ2) = C(k, ˆ2)+∑_{j=0}^{k−2} C(j, ˆ2) = C(k +1, ˆ2), where the last equality follows from Eq. (2). Note that we define P (0, ˆ2) = 1 similar to the definition for C(0, ˆ2).

To derive the generating function, we separate G_{P} (z) into odd and even terms, substitute the relevant formulas, factor out appropriate powers of z and express the resulting series in terms of the generating function G_{C}(z^{2}):

G_{P} (z) = ∑_{k=0}^{∞} P (2k + 1, ˆ2)z^{2k+1} + ∑_{k=0}^{∞} P (2k, ˆ2)z^{2k}

= \frac{1}{z} ∑_{k=0}^{∞} C(k + 1, ˆ2)(z^{2})^{k+1} + z^{3} ∑_{k=0}^{∞} C(k − 1, ˆ2)(z^{2})^{k−1} +

\frac{1}{z^{2}} ∑_{k=0}^{∞} C(k + 1, ˆ2)(z^{2})^{k+1}

= G_{C}(z^{2}) (\frac{z + z^{5} + 1}{z^{2}}) − \frac{1}{z} − \frac{1}{z^{2}} .

Substituting the formula for G_{C}(z^{2}) and simplifying gives the desired result.

Table 5 gives the number of palindromes of n without 2’s for 0 ≤ n ≤ 16.

\begin{matrix}n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 \\ P (n, ˆ2) & 1 & 1 & 1 & 2 & 2 & 3 & 4 & 5 & 7 & 9 & 12 & 16 & 21 & 28 & 37 & 49 & 65 \end{matrix}

Table 5: The number of palindromes of n without 2’s

The sequence P (2k + 1, ˆ2) appears as A005314 in [10] as one of the sequences used to define Toeplitz matrices whose inverses contain large entries (for a definition see [8], p. 130). A005314’s definition, a(n) = 2a(n − 1) − a(n − 2) + a(n − 3) is identical to Equation 2, which counts the number of compositions. There is an easy combinatorial explanation for this fact, namely an alternative method to create palindromes. Rather than using compositions, we proceed in a manner similar to the way we created compositions recursively: Append “1+” and “+1” to the left and right end of a palindrome of (odd) n, respectively, or increase the two end summands by 1. If the palindrome consists of a single summand, increase the summand by 2 instead. Delete the palindromes that would result in a forbidden 2, and create those that have end summands 3 by adding a 3 to both ends of a palindrome of n − 6. Thus, the total number of palindromes for odd n is given by is given by P (2k + 1, ˆ2) = 2P (2(k − 1) + 1, ˆ2) − P (2(k − 2) + 1, ˆ2) + P (2(k − 3) + 1, ˆ2). Comparison of the initial terms (a(0) = 0, a(1) = 1, a(2) = 2) shows that P (2k + 1, ˆ2) = a(k + 1).

The complete sequence P (n, ˆ2) appears in [10] as shifted sequence A000931, the Padovan sequence, with a(n) = P (n − 5, ˆ2), and as A078027, with a(n) = P (n − 7, ˆ2). Using the generating function derived in Theorem 10 and standard methods to compute the generating function of a shifted sequence (see for example [11], Rule 1, p. 34), it can be established that the sequences are identical.

6 Extensions and open problems

We have not counted the number of occurrences of the integer i in all palindromes of n, nor the number of palindromes of n with j parts. Previous experience [6] predicts that the formulas tend to be more complicated for palindromes, as it is necessary to distinguish between odd and even n, as seen also in Theorem 10 for the total number of palindromes of n.

Another problem is to ask similar questions for partitions of n without 2’s. In the proofs of Theorems 5 through 9 we used partitions in order to count the compositions without 2’s. Table 6 gives the number of partitions of n with no 2’s, computed using Mathematica. No easy recursion exists to create the partitions of n+1 from those of n. Again the corresponding sequence is not yet listed in [10].

\begin{matrix}n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 \\ π(n) & 1 & 1 & 2 & 3 & 4 & 6 & 8 & 11 & 15 & 20 & 26 & 35 & 45 & 58 \end{matrix}

\begin{matrix}n & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 \\ π(n) & 75 & 96 & 121 & 154 & 193 & 242 & 302 & 375 & 463 & 573 \end{matrix}

Table 6: The number of partitions of n without 2’s

7 Acknowledgements

The authors would like to thank the anonymous referee for his thorough reading of the manuscript.

References

[1] G. E. Andrews, The Theory of Partitions, Cambridge University Press, 1984.

[2] R. Austin and R. K. Guy, Binary sequences without isolated ones, Fibonacci Quart., 16 (1978) 84–86.

[3] A. H. Beiler, Recreations in the Theory of Numbers, Dover Publications, New York, 1964.

[4] R. C. Brigham, R. M. Caron, P. Z. Chinn and R. P. Grimaldi, A tiling scheme for the Fibonacci Numbers, J. Recreational Mathematics, Volume 28, Number 1 (1996-7) 10–16.

[5] P. Z. Chinn, G. Colyer, M. Flashman and E. Migliore, Cuisenaire rods go to college, PRIMUS, Vol. II, Number 2 (1992) 118–130.

[6] P. Z. Chinn, R. P. Grimaldi and S. Heubach, The frequency of summands of a particular size in palindromic compositions, to appear in Ars Combin.

[7] P. Z. Chinn and E. O. Hare, Tiling with Cuisenaire rods, G. E. Bergum et al. (eds.), Applications of Fibonacci Numbers, Kluwer Academic Publishers, 6 (1996) 165–171.

[8] R. L. Graham and N. J. A. Sloane, Anti-Hadamard matrices, Linear Algebra Appl., 62 (1984) 113–137.

[9] R. P. Grimaldi, Compositions without the summand 1, Congr. Numer. 152 (2001) 33–43.

[10] N. J. A. Sloane, editor (2002), The On-Line Encyclopedia of Integer Sequences, http://www.research.att.com/ njas/sequences/

[11] H. S. Wilf, Generatingfunctionology, 2^{nd} edition, Academic Press, 1994.

2000 Mathematics Subject Classification: 05A99 . Keywords: Compositions, palindromes, n-dimensional partitions, pentagonal pyramidal numbers, square numbers, triangle numbers, tilings.

(Concerned with sequences \underline{A005251}, \underline{A008778}, \underline{A002411}, \underline{A008779}, \underline{A005314}, \underline{A000931}, and \underline{A078027} .)

Received January 24, 2003; revised version received July 2, 2003. Published in Journal of Integer Sequences July 8, 2003.

Return to Journal of Integer Sequences home page.