An m-path cover Γ={Pℓ1,Pℓ2,…,Pℓr} of a simple graph G is a set of vertex disjoint paths of G, each with ℓk≤m vertices, that span G. With every Pℓ we associate a weight, ω(Pℓ), and define the weight of Γ to be ω(Γ)=∏k=1rω(Pℓk). The m-path cover polynomial of G is then defined as ℙm(G)=∑Γω(Γ), where the sum is taken over all m-path covers Γ of G. This polynomial is a specialization of the path-cover polynomial of Farrell. We consider the m-path cover polynomial of a weighted path P(m-1,n) and find the (m+1)-term recurrence that it satisfies. The matrix form of this recurrence yields a formula equating the trace of the recurrence matrix with the m-path cover polynomial of a suitably weighted cycle C(n). A directed graph, T(m), the edge-weighted m-trellis, is introduced and so a third way to generate the solutions to the above (m+1)-term recurrence is presented. We also give a model for general-term linear recurrences and time-dependent Markov chains.
Let G be a graph with no loops or multiple edges, with vertex set V(G).
First we review some basic concepts to establish notation.
A path Pℓ in G is a sequence of distinct vertices Pℓ=[v1,v2,…,vℓ] where each pair (vi,vi+1) for 1≤i≤ℓ-1 is an edge. The length of a path is the number of vertices in it. Thus a path of length 1 is a vertex and a path of length 2 is an edge, and Pℓ has length ℓ. Path Pℓ begins at vertex v1, its first vertex, and ends at vertex vℓ, its last vertex. The path [v1,v2,…,vℓ] and its reverse [vℓ,vℓ-1,…,v1] are considered to be the same path. The set of vertices in Pℓ is V(Pℓ)={v1,v2,…,vℓ}. Two paths Pℓ and Pℓ′ in G are disjoint if V(Pℓ)∩V(Pℓ′)=∅. The empty path has 0 vertices. Finally, recall that a subgraph of G spans G if it has the same vertex set as G.
Now we introduce the central concept of this paper.
An m-path Pℓ has ℓ≤m; that is, it is a path of length at most m for some fixed m with 1≤m≤|V(G)|.
An m-path cover Γ={Pℓ1,Pℓ2,…,Pℓr} of G is a set of pairwise disjoint m-paths of G that span G. Thus each ℓk satisfies 1≤ℓk≤m, and every vertex of G lies in exactly one m-path; that is, V(G)=∪k=1rV(Pℓk) is a partition of V(G).
With every m-path Pℓ we associate a weight, ω(Pℓ), and then the weight of Γ is ω(Γ)=∏k=1rω(Pℓk).
Definition 1.
The m-path cover polynomial of G, ℙm(G), is the sum of the weights of all m-path covers of G; that is,
(1)ℙm(G)=∑Γω(Γ),
where Γ is an m-path cover of G.
The path-cover polynomial (or path polynomial) of a graph G is a specialization of the F-cover polynomial of Farrell [1] where F is restricted to be a path; see Farrell [2]. Thus our m-path cover polynomial ℙm(G) is a further specialization to paths of length ℓ≤m. See also Chow [3] and D’Antona and Munarini [4].
It seems that this research is the first direct consideration of the m-path cover polynomial of a graph. See McSorley et al. [5] for specialization to the case m=2, where all classical orthogonal polynomials are generated as 2-path cover polynomials of suitably weighted paths. For related work see the theory of weighted linear species developed in Joyal [6] and Bergeron et al. [7]. In particular, Munarini [8] uses the m-filtered linear partitions of a linearly ordered set to achieve some similar results; see especially our Sections 7 and 8.
In Section 2 we introduce a weighted path P(m-1,n) and find the (m+1)-term recurrence that its m-path polynomial satisfies. In Section 3 the matrix form of this recurrence is presented and yields a trace formula that, in Section 4, gives the m-path cover polynomial of a suitably weighted cycle C(n). Section 5 interprets our results in terms of a model for time-dependent Markov chains. In Section 6 a directed graph, T(m), the edge-weighted m-trellis, is introduced and so a third way to generate the solutions to the above recurrence and trace is found. In Section 7 we model general constant coefficient linear recurrences, and we derive various relevant formulas with both algebraic and combinatorial proofs. Finally, in Section 8, we obtain a relevant new integer sequence and relate this sequence to known sequences in the literature.
Notation. We write ℙm[v1,v2,…,vℓ], instead of ℙm([v1,v2,…,vℓ]), for the m-cover polynomial of the path [v1,v2,…,vℓ]; similarly we write ω[v1,v2,…,vℓ] instead of ω([v1,v2,…,vℓ]), and so forth.
Vertices in P(m-1,n) (Section 2) and in subpaths of P(s,n) will be labelled ui; vertices in C(n) (Section 4) will be labelled vi; and vertices in T(m) (Section 6) will be labelled wi.
For 1≤ℓ≤m we use indeterminate xℓ,i as the weight of a path of length ℓ in G. Throughout the paper m≥1 is fixed. In all the examples we set m=3, and many examples have n=4.
For m≥1 and n≥0 the path P(m-1,n) has m-1+n vertices {u1,u2,…,um-1+n}. The first m-1 vertices are weighted with weight 1 and the remaining n vertices are weighted, one by one, with the indeterminates from the set {x1,1,x1,2,…,x1,n}. Thus all vertices, that is, all paths of length ℓ=1, in P(m-1,n) are weighted. For 2≤ℓ≤m a path of length ℓ in P(m-1,n) is weighted with 0 if its last vertex has weight 1 and with xℓ,i if its last vertex has weight x1,i. The path P(0,0) is the empty path with no vertices.
Definition 2.
For n≥1 let fm,n be the m-path cover polynomial of the weighted P(m-1,n).
Starting conditions are fm,n=1 for -(m-1)≤n≤0.
As mentioned in Section 1, throughout this paper the path [ua,ua+1,…,ub] is a subpath of the weighted P(m-1,n).
We now derive our main (m+1)-term recurrence.
Theorem 3.
For a fixed m≥1 and any n≥-(m-1),
(2)fm,n=x1,nfm,n-1+x2,nfm,n-2+⋯+xm,nfm,n-m=∑ℓ=1mxℓ,nfm,n-ℓ.
Proof.
The last vertex um-1+n of P(m-1,n) lies in every m-path cover of P(m-1,n). Suppose, in such an m-path cover, it is present as the last vertex in an m-path of length ℓ. Then this m-path has weight xℓ,n and begins at um+n-ℓ. The sum of the weights of all such m-path covers is therefore
(3)xℓ,nℙm[u1,u2,…,um-1+n-ℓ]=xℓ,nfm,n-ℓ,
where [u1,u2,…,um-1+n-ℓ] is a subpath of P(m-1,n). Now summing over ℓ gives the result. The initial conditions fm,n=1 for -(m-1)≤n≤0 ensure that this equation holds when ℓ≥n.
Example 4.
For m=3 the weighted path P(2,3) is
(4)
The weights of paths of lengths ℓ=1 and 2 (vertices and edges) are shown above the path. Vertex labels and weights of paths of length ℓ=3 are shown below the path. Let
(5)ℓ=1:ω[u1]=ω[u2]=1,ω[u3]=x1,1,ω[u4]=x1,2,ω[u5]=x1,3,ℓ=2:ω[u1,u2]=0,ω[u2,u3]=x2,1,ω[u3,u4]=x2,2,ω[u4,u5]=x2,3,ℓ=3:ω[u1,u2,u3]=x3,1,ω[u2,u3,u4]=x3,2,ω[u3,u4,u5]=x3,3.
All 3-path covers of P(2,3) and their weights are shown below:
(6)
So f3,3=x1,1x1,2x1,3+x1,2x1,3x2,1+x1,3x2,2+x1,1x2,3+x2,1x2,3+x1,2x1,3x3,1+x1,3x3,2+x2,3x3,1+x3,3.
Example 5.
Theorem 3 with m=3 gives the 4-term recurrence for a fixed n≥1,
(7)f3,n=x1,nf3,n-1+x2,nf3,n-2+x3,nf3,n-3.
Then the starting conditions f3,-2=f3,-1=f3,0=1 give
(8)f3,1=x1,1+x2,1+x3,1,f3,2=x1,1x1,2+x1,2x2,1+x1,2x3,1+x2,2+x3,2,f3,3=x1,1x1,2x1,3+x1,2x1,3x2,1+x1,3x2,2+x1,1x2,3+x2,1x2,3+x1,2x1,3x3,1+x1,3x3,2+x2,3x3,1+x3,3,f3,4=x1,1x1,2x1,3x1,4+x1,2x1,3x1,4x2,1+x1,2x1,3x1,4x3,1+x1,1x1,2x2,4+x1,1x1,4x2,3+x1,2x2,1x2,4+x1,2x2,4x3,1+x1,3x1,4x2,2+x1,3x1,4x3,2+x1,4x2,1x2,3+x1,4x2,3x3,1+x1,1x3,4+x1,4x3,3+x2,1x3,4+x2,2x2,4+x2,4x3,2+x3,1x3,4⋮
We check f3,3 from Example 4.
Definition 6.
For 0≤r≤m-1 we define P(r,n) as above for P(m-1,n), except that we have r vertices instead of m-1 vertices of weight 1 at the beginning of the path. Thus P(r,n) has r+n vertices and is formed from P(m-1,n) by truncating from the right. All m-paths in P(r,n) are weighted as in P(m-1,n). We let 𝒫m(r,n) be the m-path cover polynomial of the weighted P(r,n). We note that fm,n=𝒫m(m-1,n).
Example 7.
For m=3 and n=4,
(9)𝒫3(0,4)=x1,1x1,2x1,3x1,4+x1,1x1,2x2,4+x1,1x1,4x2,3+x1,3x1,4x2,2+x1,1x3,4+x1,4x3,3+x2,2x2,4,𝒫3(1,4)=x1,1x1,2x1,3x1,4+x1,2x1,3x1,4x2,1+x1,3x1,4x2,2+x1,1x1,4x2,3+x1,1x1,2x2,4+x1,4x2,1x2,3+x1,2x2,1x2,4+x1,3x1,4x3,2+x1,1x3,4+x1,4x3,3+x2,1x3,4+x2,2x2,4+x2,4x3,2,𝒫3(2,4)=f3,4;
see Example 5.
For a fixed r with 0≤r≤m-1 we define the starting conditions,
(10)𝒫m(r,n)={0,if-(m-1)≤n≤-r-1,1,if-r≤n≤0.
We then have the following recurrence; the proof is similar to the proof of Theorem 3, and setting r=m-1 recovers Theorem 3.
Theorem 8.
For a fixed r with 0≤r≤m-1 and any n≥1,
(11)𝒫m(r,n)=∑ℓ=1mxℓ,n𝒫m(r,n-ℓ).
We now work with the fundamental solutions to recurrence (2).
For 1≤j≤m let fm,n(j) denote the jth fundamental solution to (2). Thus the fm,n(j) obey the recurrence
(12)fm,n(j)=∑ℓ=1mxℓ,nfm,n-ℓ(j),
with starting conditions
(13)fm,-(m-1)+k(j)={1,ifk=m-j,0,ifk≠m-j,
where 0≤k≤m-1.
We have
(14)fm,n=∑j=1mfm,n(j).
Our next result expresses fm,n(j) as the difference of two m-path cover polynomials. Consistent with (10) we set 𝒫m(-1,n)=0 for every n≥-(m-1).
Lemma 9.
For n≥1 and 1≤j≤m,
(15)fm,n(j)=𝒫m(j-1,n)-𝒫m(j-2,n).
Proof.
By induction on n, first consider n=1. Now fm,1-ℓ(j)=1 when ℓ=j and fm,1-ℓ(j)=0 otherwise. Each fm,n(j) satisfies (12), so fm,1(j)=∑ℓ=1mxℓ,1fm,1-ℓ(j)=xj,1. Now consider the path P(j-1,1) shown below:
(16)
The first vertex u1 lies in every m-path cover of P(j-1,1) so, similar to the proof of Theorem 3, we have
(17)𝒫m(j-1,1)=ω[u1]𝒫m(j-2,1)+ω[u1,u2]𝒫m(j-3,1)+⋯+ω[u1,u2,…,uj]=1·𝒫m(j-2,1)+0·𝒫m(j-3,1)+⋯+xj,1.
Thus, from above, fm,1(j)=xj,1=𝒫m(j-1,1)-𝒫m(j-2,1); that is, (15) is true for n=1.
Now we have
(18)fm,n+1(j)=∑ℓ=1mxℓ,n+1fm,n+1-ℓ(j)=∑ℓ=1mxℓ,n+1{𝒫m(j-1,n+1-ℓ)-𝒫m(j-2,n+1-ℓ)}=∑ℓ=1mxℓ,n+1𝒫m(j-1,n+1-ℓ)-∑ℓ=1mxℓ,n+1𝒫m(j-2,n+1-ℓ)=𝒫m(j-1,n+1)-𝒫m(j-2,n+1),
using (12) again at the first line, the induction hypothesis at the second line and Theorem 8 at the last line. Hence the induction goes through and (15) is true for all n≥1.
Example 10.
Using (12) and the starting conditions following (12) for m=3 and n=4 the 3 fundamental solutions to recurrence (2) are
(19)f3,4(1)=x1,1x1,2x1,3x1,4+x1,1x1,2x2,4+x1,1x1,4x2,3+x1,3x1,4x2,2+x1,1x3,4+x1,4x3,3+x2,2x2,4,f3,4(2)=x1,2x1,3x1,4x2,1+x1,3x1,4x3,2+x1,4x2,1x2,3+x1,2x2,1x2,4+x2,4x3,2+x2,1x3,4,f3,4(3)=x1,2x1,3x1,4x3,1+x1,4x2,3x3,1+x1,2x2,4x3,1+x3,1x3,4.
We check (14) using Example 5,
(20)f3,4=f3,4(1)+f3,4(2)+f3,4(3).
We also check Lemma 9 using 𝒫3(-1,4)=0 and Example 7,
(21)f3,4(1)=𝒫3(0,4)-𝒫3(-1,4)=𝒫3(0,4),f3,4(2)=𝒫3(1,4)-𝒫3(0,4),f3,4(3)=𝒫3(2,4)-𝒫3(1,4).
By iteration of such formulas, we have Corollary 11, where (ii) is a specialization of (i) with r=0.
Corollary 11.
(i) For 1≤j≤m,
(22)𝒫m(r,n)=∑j=1r+1fm,n(j),
(ii) the first fundamental solution to recurrence (2) is given by
(23)fm,n(1)=𝒫m(0,n).
Corollary 12 is a useful technical result.
Corollary 12.
For n≥1 and 1≤j≤m,
(24)fm,n+1-j(j)=∑ℓ=jmxℓ,ℓ+1-jℙm[um+ℓ+1-j,…,um+n-j].
Proof.
For j=1 from Corollary 11(ii) we have fm,n(1)=𝒫m(0,n). Now in the weighted path P(0,n) let vertex u1 be covered by a path Qℓ of length ℓ where 1≤ℓ≤m. Then Qℓ begins at vertex u1 and ends at vertex uℓ, which has weight x1,ℓ; so ω(Qℓ)=xℓ,ℓ. Now in every m-path cover of P(0,n) vertex u1 must be covered by such a path Qℓ, so fm,n(1)=∑ℓ=1mxℓ,ℓℙm[uℓ+1,…,un], which is the above formula for j=1.
For any 2≤j≤m the path [um+1-j,…,um-1+n] is a subpath of P(m-1,n). In fact the weighted paths P(j-1,n) and [um+1-j,…,um-1+n] (except for vertex labels) are identical, so 𝒫m(j-1,n)=ℙm[um+1-j,…,um-1+n]. From Lemma 9 we have
(25)fm,n+1-j(j)=𝒫m(j-1,n+1-j)-𝒫m(j-2,n+1-j)=ℙm[um+1-j,…,um+n-j]-1·ℙm[um+2-j,…,um+n-j]=sumoftermsofℙm[um+1-j,…,um+n-j]inwhichvertexum+1-jiscoveredbyapathwhoseweightisanindeterminateasopposedtoapathwithweight1.
So let vertex um+1-j be covered by a path Qℓ of length ℓ≥1. Then Qℓ begins at vertex um+1-j and ends at vertex um+ℓ-j, which has weight x1,ℓ+1-j. Hence ω(Qℓ)=xℓ,ℓ+1-j. Furthermore, because Qℓ ends at um+ℓ-j if ℓ<j, then m+ℓ-j≤m-1; hence w(Qℓ)=0, a contradiction; so ℓ≥j.
Now, similar to the above, the sum of the terms of ℙm[um+1-j,…,um+n-j] that contain xℓ,ℓ+1-j is xℓ,ℓ+1-jℙm[um+ℓ+1-j,…,um+n-j]. Finally, summing over the lengths ℓ of all possible paths Qℓ, namely, summing over ℓ with j≤ℓ≤m, gives the result.
This completes study of the weighted path P(m-1,n).
3. Matrix Formulation and Trace
We set up our (m+1)-term recurrence (2) in matrix form.
Let Xm,0=Im be the m×m identity matrix, and for n≥1 let Xm,n be the m×m matrix
(26)Xm,n=(01·⋯0001⋯0⋮⋮⋮⋮⋮000⋯1xm,nxm-1,nxm-2,n⋯x1,n).
Let T denote transpose, and let Fm,n be the vector Fm,n=(fm,n-(m-1),…,fm,n)T. Then recurrence (2) can be written as
(27)Fm,n=Xm,nFm,n-1,
where Fm,0=(fm,-(m-1),…,fm,0)T=(1,…,1)T. By iterating this equation we have Fm,n=Ym,nFm,0, where
(28)Ym,n=Xm,nXm,n-1⋯Xm,0=(fm,n-(m-1)(m)·⋯·fm,n-(m-1)(1)fm,n-(m-2)(m)·⋯·fm,n-(m-2)(1)⋮⋮⋮⋮⋮fm,n-1(m)·⋯·fm,n-1(1)fm,n(m)·⋯·fm,n(1)).
With tr denoting trace, we have the following.
Lemma 13.
For n≥1,
(29)tr(Ym,n)=∑j=1mfm,n+1-j(j).
We now apply these results to the weighted cycle C(n).
We introduce the weighted cycle C(n) for n≥1 shown in Figure 1. It has n vertices labelled {v1,v2,…,vn} and n edges.
Weighted C(n).
It is weighted as follows: for 1≤ℓ≤m, let Pℓ be a path of length ℓ that traverses C(n) clockwise and ends at vertex vi. We define ω(Pℓ)=xℓ,i.
Thus the weighted cycle C(1) is an isolated vertex v1 with weight ω(v1)=x1,1; and the weighted cycle C(2) has 2 vertices {v1,v2} with ω(v1)=x1,1 and ω(v2)=x1,2 and 2 edges: edge (v1,v2) with ω(v1,v2)=x2,2 and edge (v2,v1) with ω(v2,v1)=x2,1.
In Figure 1 only the weights of paths of lengths ℓ=1 and 2 are shown.
Lemma 14.
For 1≤a≤b≤n the following m-path cover polynomials, the first which comes from C(n) and the second from P(m-1,n), are equal:
(30)ℙm[va,…,vb]=ℙm[um-1+a,…,um-1+b].
Proof.
Except for vertex labels, the weighted paths [va,…,vb] in C(n) and [um-1+a,…,um-1+b] in P(m-1,n) are identical. Hence the result is obtained.
Definition 15.
For n≥1 let 𝒞m(n) be the m-path cover polynomial of the weighted C(n).
In the following, when necessary, we reduce subscripts on u, v, and the second subscript on x, all modulo n. We write un+t=ut, vn+t=vt, xℓ,n+t=xℓ,t, and so forth.
Theorem 16 is the main result of this section. Recall the matrix Ym,n from (28).
Theorem 16.
For n≥1,
(31)𝒞m(n)=tr(Ym,n).
Proof.
Consider the weighted C(n). Vertex v1 lies in every m-path cover of C(n). Suppose, in such an m-path cover, it is covered by a path Pℓ of length ℓ that begins at vn-p and ends at vn-p-1+ℓ, for some p∈{-1,0,1,…,ℓ-2}. Now 1≤ℓ≤m; that is, p+2≤ℓ≤m. The sum of the weights of all such paths is then
(32)∑ℓ=p+2mxℓ,n-p-1+ℓℙm[vn-p+ℓ,…,vn-p-1].
But p∈{-1,0,1,…,m-2}, so
(33)𝒞m(n)=∑p=-1m-2∑ℓ=p+2mxℓ,n-p-1+ℓℙm[vn-p+ℓ,…,vn-p-1]=∑j=1m∑ℓ=jmxℓ,n+ℓ+1-jℙm[vn+ℓ+2-j,…,vn+1-j]=∑j=1m∑ℓ=jmxℓ,ℓ+1-jℙm[um+ℓ+1-j,…,um-j]=∑j=1mfm,n+1-j(j)=tr(Ym,n),
letting j=p+2 at the second line, and using subscript reduction modulo n and Lemma 14 at the third line, then Corollary 12 at the fourth line, and Lemma 13 at the last line.
Example 17.
For m=3 and n=4 consider the weighted C(4) in Figure 2.
Weighted C(4).
The 3-paths are weighted as follows:
(34)ℓ=1:ω[v1]=x1,1,ω[v2]=x1,2,ω[v3]=x1,3,ω[v4]=x1,4,ℓ=2:ω[v1,v2]=x2,2,ω[v2,v3]=x2,3,ω[v3,v4]=x2,4,ω[v4,v1]=x2,1,ℓ=3:ω[v1,v2,v3]=x3,3,ω[v2,v3,v4]=x3,4,ω[v3,v4,v1]=x3,1,ω[v4,v1,v2]=x3,2.
By considering all 3-path covers, the 3-path cover polynomial of the weighted C(4) is
(35)𝒞3(4)=x1,1x1,2x1,3x1,4+x1,1x1,2x2,4+x1,2x1,3x2,1+x1,3x1,4x2,2+x1,1x1,4x2,3+x1,3x3,2+x1,4x3,3+x1,1x3,4+x1,2x3,1+x2,1x2,3+x2,2x2,4.
Similar to Example 10, the recurrence (12) and the starting conditions following (12) give
(36)f3,4(1)=x1,1x1,2x1,3x1,4+x1,1x1,2x2,4+x1,1x1,4x2,3+x1,3x1,4x2,2+x1,1x3,4+x1,4x3,3+x2,2x2,4,f3,3(2)=x1,2x1,3x2,1+x1,3x3,2+x2,1x2,3,f3,2(3)=x1,2x3,1.
Together with the following matrices (37)Y3,4=X3,4X3,3X3,2X3,1X3,0=(010001x3,4x2,4x1,4)(010001x3,3x2,3x1,3)(010001x3,2x2,2x1,2)(010001x3,1x2,1x1,1)=(x1,2x3,1x1,2x2,1+x3,2x1,1x1,2+x2,2x1,2x1,3x3,1+x2,3x3,1x1,3x3,2+x2,1x2,3+x1,2x1,3x2,1x1,1x2,3+x1,3x2,2+x1,1x1,2x1,3+x3,3x1,2x2,4x3,1+x1,2x1,3x1,4x3,1+x1,4x2,3x3,1+x3,1x3,4x1,2x2,4x2,1+x1,2x1,3x1,4x2,1+x1,3x1,4x3,2+x1,4x2,1x2,3+x2,1x3,4+x2,4x3,2x1,1x3,4+x1,1x1,2x2,4+x1,1x1,4x2,3+x1,1x1,2x1,3x1,4+x1,3x1,4x2,2+x1,4x3,3+x2,2x2,4),we may check the results from Lemma 13 and Theorem 16,
(38)𝒞3(4)=tr(Y3,4)=∑j=13f3,5-j(j)=f3,4(1)+f3,3(2)+f3,2(3).
5. Markov Chain Interpretation
In this section we consider an interesting special case, where in the matrix formulation of the recurrence we have stochastic matrices. A matrix of Form (26) can be considered a transition matrix for a Markov chain with m states under the conditions
(39)∑jxj,n=1,xj,n≥0,∀j.
Because the probabilities xj,n vary with n, these are the transition matrices for a nonhomogeneous Markov chain. Note also that, as transition matrices are multiplied from left to right, the process is effectively time reversed. In fact,
(40)P[jumpattimeνfromstatemtostatej]=xm-j+1,n-ν+1.
This process is often referred to as a ladder process. From any state j, with j<m, the process jumps with certainty to j+1, then to j+2, and so forth, up the ladder, till it reaches state m. At that point it jumps randomly back down the ladder to one of the intermediates states j, 1≤j<m, and the procedure repeats. Because all of the matrices are stochastic, the row sums of matrices such as Ym,n, see (28), will all equal 1. Recall from Section 3 that
(41)(fm,n-m+1⋮fm,n)=Ym,n(1⋮1).
Thus, we have the following.
Proposition 18.
In the stochastic case, all of the path polynomials fm,n evaluate to 1.
5.1. Homogeneous Case
In the case of constant coefficients (see (26)), sending xℓ,i→xℓ, for all i, we drop the dependence on n and write
(42)Xm=(01·⋯0001⋯0⋮⋮⋮⋮⋮000⋯1xmxm-1xm-2⋯x1),
with ∑xj=1. Now
(43)Ym,n=(Xm)n
is the n-step transition matrix. It is easy to see that a row vector (on the left) fixed by Xm is
(44)(xm,xm+xm-1,…,xm+xm-1+⋯+x2,1).
Furthermore, under the assumption xj>0, for all j, it is immediate that the chain is irreducible and aperiodic, hence ergodic. That is,
(45)limn→∞Ym,n=Ω
exists and has equal rows, and each row proportional to the left-invariant vector indicated above normalized to row sum 1.
Example 19.
Take the uniform case xj=1/m, 1≤j≤m. Then we have the fixed vector (1,2,3,…,m) and the limits
(46)limn→∞fm,n(j)=2(m-j+1)m(m+1).
Thus, for large n, if we randomly choose an m-path cover of P(m-1,n) then the probability that it belongs to the j-fundamental solution is 2(m-j+1)/m(m+1). In particular, the first fundamental solution satisfies
(47)limn→∞fm,n(1)=2m+1.
So the m-path cover polynomial model provides a combinatorial model for nonhomogeneous Markov chains. A closely related model, the trellis, is discussed in detail below.
In this section we deal with the edge-weighted m-trellis, T(m), shown in Figure 3, and give another method of generating fm,n(j) and 𝒞m(n).
Edge-weighted m-trellis T(m).
The vertices of T(m) are labelled {w1,w2,…,wm}. All edges in T(m) are directed, with arrows as shown. All circuits in T(m) are directed and are traversed in the direction of the arrows. We use S to denote a directed circuit in T(m), which we simply call a circuit. A circuit is based at vertex wj if it begins and ends at vertex wj. A circuit may pass through the same vertex more than once. The length of a circuit S is the number of edges in it.
The weights on the edges of T(m) are taken from {1,x1,d,…,xm,d} where d≥1, as shown. The weight of circuit S, w(S), is the product of the weights of all the edges in S. If the edge with weight xj,d is traversed as the kth edge in S, then xj,k is a factor in w(S); thus the meaning of xj,d here is different from that in Sections 2 and 4. We allow empty circuits with length 0.
Definition 20.
Let 𝒯m(wj,0)=1 and, for s≥1, let 𝒯m(wj,s) be the sum of the weights of all circuits in T(m) that are based at vertex wj with length s.
Notation. We use standard multiset notation: 1k=1·1⋯1·1︸k, and 10 means no occurrences of 1.
Theorem 21.
For s≥0,
(48)𝒯m(w1,s)=𝒫m(0,s).
Proof.
By strong induction on s. Now 𝒯m(w1,0)=𝒫m(0,0)=1; hence (48) is true for s=0. We now assume that 𝒯m(w1,s′)=𝒫m(0,s′) for all 0≤s′≤s. Consider any term in 𝒯m(w1,s+1) is the weight of some circuit S in T(m) based at vertex w1 with length s+1. Clearly S ends with a k-cycle based at vertex w1, for some k with 1≤k≤m. Thus the last edge of S is (wk,w1), with weight xk,s+1, and the previous k-1 edges are (wk,wk-1),(wk-1,wk-2),…,(w2,w1), each of weight 1. Hence ω(S)=𝒯m(w1,s+1-k)1k-1xk,s+1. Thus
(49)𝒯m(w1,s+1)=∑k=1mxk,s+1𝒯m(w1,s+1-k)=∑k=1mxk,s+1𝒫m(0,s+1-k)=𝒫m(0,s+1),
using the strong induction hypothesis and then Theorem 8. So the induction goes through and (48) is true for all s≥0.
Let 𝒯m+c(w1,s) be the expression obtained when every indeterminate xa,b in 𝒯m(w1,s) is replaced by xa,b+c; similarly for other expressions.
Recall that [um,…,um-1+s] is a subpath of P(m-1,n) for s≥0; for s=0 the path [um,um-1] is the empty path P(0,0), and 𝒫m(0,0)=1.
Corollary 22.
For s≥0 and 0≤c≤n-s,
(50)𝒯m+c(w1,s)=ℙm[um+c,…,um-1+s+c].
Proof.
For s=0 we have 𝒯m+c(w1,0)=ℙm[um+c,um-1+c]=1. For s≥1 then [um,…,um-1+s] is a subpath of P(m-1,n) so, for every n≥s, we have 𝒫m(0,s)=ℙm[um,…,um-1+s]. Now, from Theorem 21, 𝒯m(w1,s)=𝒫m(0,s), so 𝒯m+c(w1,s)=𝒫m+c(0,s)=ℙm[um+c,…,um-1+s+c], as required.
We now connect 𝒯m(wj,n) and the fundamental solutions of the (m+1)-term recurrence (2).
Theorem 23.
For n≥0,
(51)𝒯m(wj,n)=fm,n+1-j(j).
Proof.
Consider a circuit S in T(m) based at vertex wj with n edges. Then, for some 0≤k≤m-j, the first k edges in this circuit are (wj,wj+1),(wj+1,wj+2),…,(wj+k-1,wj+k), followed by edge (wj+k,w1) ending at vertex w1. These edges contribute 1kxj+k,k+1 to w(S). Now, starting at vertex w1, the last j-1 edges traversed in S are (w1,w2),(w2,w3),…,(wj-1,wj), contributing 1j-1 to w(S). Hence ω(S)=xj+k,k+1𝒯m+(k+1)(w1,n-j-k).
Thus
(52)𝒯m(wj,n)=∑k=0m-jxj+k,k+1𝒯m+(k+1)(w1,n-j-k)=∑ℓ=jmxℓ,ℓ+1-j𝒯m+(ℓ+1-j)(w1,n-ℓ)=∑ℓ=jmxℓ,ℓ+1-jℙm[um+ℓ+1-j,…,um+n-j]=fm,n+1-j(j),
putting ℓ=j+k at the second line, then using Corollary 22 with c=ℓ+1-j and s=n-ℓ at the third line, and finally using Corollary 12 at the last line.
Example 24.
Consider T(3), the edge-weighted 3-trellis; see Figure 4.
𝒯3(w2,5) = sum of weights of circuits of T(3) based at w2 with length 5=x2,1x1,2x1,3x1,41+x2,1x1,21x2,41+x2,11·1x3,41+x2,11x2,3x1,41+1x3,2x1,3x1,41 + 1x3,21x2,41=f3,4(2), as in Example 10.
𝒯3(w3,6)= sum of weights of circuits based at w3 with length 6.
We observe that the first edge in such a circuit is edge (w3,w1) of weight x3,1; hence x3,1 is a factor of every term in 𝒯3(w3,6)=f3,4(3), consistent with Example 10 again.
Finally, we bring the results from Lemma 13 and Theorems 16 and 23 together in Theorem 25.
Edge-weighted 3-trellis T(3).
Theorem 25.
For 1≤n≤m,
(53)𝒞m(n)=tr(Ym,n)=∑j=1m𝒯m(wj,n).
Example 26.
Again, from T(3), we have 𝒞3(4)=∑j=13𝒯3(wj,4):
(54)𝒯3(w1,4)=x1,1x1,2x1,3x1,4+x1,1x1,21x2,4+x1,11x2,3x1,4+x1,11·1x3,4+1x2,2x1,3x1,4+1x2,21x2,4+1·1x3,3x1,4=f3,4(1),𝒯3(w2,4)=x2,1x1,2x1,31+x2,11x2,31+1x3,2x1,31=f3,3(2),𝒯3(w3,4)=x3,1x1,21·1=f3,2(3),
which are consistent with the above definitions and results and with Example 17.
In this section, we consider the case of constant coefficients, that is, where the indeterminates xℓ,i are independent of i.
Notation. We use * to modify a path or expression or matrix in which weights or indeterminates xℓ,i are replaced with xℓ.
First we review some known properties of m-path polynomials using standard techniques. Then we show how our model recovers these results combinatorially.
7.1. Constant Coefficient Recurrences
This subsection mainly establishes notation and recalls basic results of interest.
Consider the recurrence
(55)yn=∑i=1mxiyn-i.
We begin with the first fundamental solution. The following is standard and readily derived via geometric series and multinomial expansion.
Proposition 27.
One has the generating function and formula
(56)∑n≥0hntn=11-∑i=1mxiti=∑n≥0∑∑ℓsℓ=n(s1+s2+⋯+sms1,s2,…,sm)x1s1x2s2⋯xmsmtn
giving the (first) fundamental solution, hn, to the recurrence, that is, with initial values hi=0, -(m-1)≤i<0, h0=1.
The matrix Xm takes the form, confor Section 5.1,
(57)Xm=(010⋯0001⋯0⋮⋮⋮⋱⋮000⋱1xmxm-1xm-2⋯x1)
so that det(I-tXm)=1-∑i=1mxiti. Define the (r+1)st fundamental solution to recurrence (55) to be the one with initial conditions
(58)yi=0,for-(m-1)≤i≤0,i≠-ry-r=1,
and denote this fundamental solution by hn(r+1), with hn=hn(1). Then the entries in the bottom row of (Xm)n are exactly the values
(59)((Xm)n)(m,j)=hn(m-j+1).
In general,
(60)((Xm)n)(i,j)=hn-m+i(m-j+1).
The fundamental solutions for r>0 can be expressed in terms of the first fundamental solution as follows.
Proposition 28.
The (r+1)st fundamental solution to the recurrence (55) is given by
(61)hn(r+1)=hn+r-∑k=0r-1hn+kxr-k,
where hn denotes the first fundamental solution.
Proof.
We will illustrate for r≤2 that shows how the general case works. We have
(62)hn(1)=hn,hn(2)=hn+1-x1hn,hn(3)=hn+2-x1hn+1-x2hn.
For r=1, we obtain 0 for nonpositive n, except for n=-1, as required. Similarly, for r=2, for nonpositive n we obtain 1 precisely for n=-2; otherwise we get 0. Note that the subtractions are necessary to cancel off terms when 0≥n>-r. Since the coefficients are independent of n, these are indeed solutions to the recurrence. Thus the result is obtained.
Now for the trace, we have the following.
Proposition 29.
The trace of (Xm)n is given by
(63)tr(Xm)n=∑j=1mjhn-jxj.
Proof.
From (60), we have, using Proposition 28,
(64)tr(Xm)n=∑i=1mhn-m+i(m-i+1)=∑i=0m-1hn-i(i+1)=∑i=0m-1[hn-∑k=0i-1hn-i+kxi-k]=∑i=0m-1[hn-∑j=1ihn-jxj]=mhn-∑i=0m-1∑j=1ihn-jxj(next,interchangingtheorderofsummation)=mhn-∑j=1m-1∑i=jm-1hn-jxj=mhn-∑j=1m-1(m-j)hn-jxj=m[hn-∑j=1m-1hn-jxj]+∑j=1m-1jhn-jxj=∑j=1mjhn-jxj(bytherecurrencefor{hn}).
Remark 30.
These are a variation on Newton’s Identities relating power sum symmetric functions and elementary symmetric functions. Here, the homogeneous symmetric functions, hn, play a role as well.
7.2. Combinatorial Proofs
We now show how these formulas may be derived combinatorially by our model with the specialization xℓ,i→xℓ. The weighted path P*(2,3) looks like
(65)
Notation. Consistent with the above, we use h or ℋ to represent expressions in which we have replaced xℓ,i with xℓ. Thus ℋm(r,n)=𝒫m*(r,n), for 0≤r≤m-1; see Definition 6 of weighted path P(r,n).
7.2.1. First Fundamental Solution
Proposition 27 is readily seen from the weighting of path P*(m-1,n). For the first fundamental solution, there are no vertices with weight 1, and no edges weighted 0. The first vertex has weight x1, and so on. In an m-path cover the exponent sℓ is the number of paths of length ℓ, for each 1≤ℓ≤m, and the multinomial coefficient counts the number of m-path covers obtained from any fixed set of m-paths. So this model gives a visual interpretation to the analytic formula.
7.2.2. Higher Fundamental Solutions
Start with the following.
Lemma 31.
For a fixed r with 1≤r≤m-1 and any n≥1,
(66)ℋm(r,n)-ℋm(r-1,n)=∑ℓ=r+1mxℓℋm(0,n+r-ℓ).
Proof.
For r≥1, consider the weighted path P*(r,n). The first vertex u1 must lie in every m-path cover of this path, say on a path Qℓ of length ℓ for 1≤ℓ≤m, starting at u1. If ℓ=1 then ω(Q1)=ω(u1)=1, and the sum of all such m-path covers is thus 1·ℋm(r-1,n). If 2≤ℓ≤r then Qℓ finishes at vertex uℓ where ω(uℓ)=1, so ω(Qℓ)=0. And if r+1≤ℓ≤m then Qℓ finishes at vertex uℓ where ω(uℓ)=x1 and so ω(Qℓ)=xℓ, and the sum of all such m-path covers is xℓℋm(0,n+r-ℓ). Hence ℋm(r,n)=ℋm(r-1,n)+∑ℓ=r+1mxℓℋm(0,n+r-ℓ), and so the result is obtained.
Now for a combinatorial proof of Proposition 28.
Theorem 32.
For the fundamental solutions to the recurrence for the homogeneous path polynomials, one has
(67)hn(r+1)=hn+r-∑ℓ=1rxℓhn+r-ℓ.
Proof.
By our definitions and Corollary 11(ii) we have hn=fm,n(1)*=𝒫m*(0,n)=ℋm(0,n). And, from Lemmas 9 and 31, we have
(68)hn(r+1)=ℋm(r,n)-ℋm(r-1,n)=∑ℓ=r+1mxℓhn+r-ℓ.
Now
(69)hn+r=ℋm(0,n+r)=∑ℓ=1mxℓhn+r-ℓ=∑ℓ=1rxℓhn+r-ℓ+∑ℓ=r+1mxℓhn+r-ℓ=∑ℓ=1rxℓhn+r-ℓ+hn(r+1),
where, at the second line, we note that in every m-path cover of the weighted path P*(0,n+r) vertex un+r must lie on a path Qℓ of length ℓ and weight xℓ where 1≤ℓ≤m, and at the last line we use (68). This gives the result.
7.2.3. Trace Formula
We now give a combinatorial derivation of the trace formula in Proposition 29.
First let 𝒯m(n) be the sum of the weights of all circuits of length n in T*(m) and the m-trellis with edge-weights xℓ,i replaced by xℓ; that is, 𝒯m(n)=∑j=1m𝒯m*(wj,n); see Section 6.
Theorem 33.
For any n≥1,
(70)tr(Xm)n=∑j=1mjxjhn-j.
Proof.
We recall that the indeterminates in any term of 𝒯m(n) are initially ordered according to the edges traversed in the corresponding circuit; see Example 26. Let 𝒳=xjxℓ1xℓ2⋯xℓr be a typical ordered term in 𝒯m(n) with all 1’s removed and with first indeterminate xj. We first show that term 𝒳 occurs j times in 𝒯m(n).
When there are two successive indeterminates xℓ and xℓ′ in 𝒳, then, in the corresponding circuit, the edges traversed are first (wℓ,w1) of weight xℓ, followed by the ℓ′-1 edges (w1,w2),(w2,w3),…,(wℓ′-1,wℓ′) each of weight 1, and then finishing with the edge (wℓ′,w1) of weight xℓ′. Hence pair xℓxℓ′ becomes xℓ1ℓ′-1xℓ′ when the indeterminates are considered as weights on edges in a circuit in T*(m).
Now, because the first indeterminate in 𝒳 is xj, any circuit corresponding to 𝒳 must be based at vertex wj′ for some j′∈{1,2,…,j}. Hence 𝒳 will appear in 𝒯m(n) as
(71)1j-j′xj1ℓ1-1xℓ11ℓ2-1xℓ21ℓ3-1⋯1ℓr-1xℓr1j′-1,
for each j′∈{1,2,…,j} in 𝒯m(n). There are j such j′, so there are j occurrences of term 𝒳 in 𝒯m(n).
Now consider an occurrence of 𝒳 in which j′=j, namely,
(72)xj1ℓ1-1xℓ11ℓ2-1xℓ21ℓ3-1⋯1ℓr-1xℓr1j-1.
Let
(73)𝒳xj1j-1=1ℓ1-1xℓ11ℓ2-1xℓ21ℓ3-1⋯1ℓr-1xℓr=𝒵.
Then the sequence of edges traversed in T*(m) corresponding to 𝒵 begins at w1 and ends at w1, and so is a circuit based at w1, with length n-1-(j-1)=n-j. Thus 𝒵∈𝒯m*(w1,n-j). Conversely given any 𝒵∈𝒯m*(w1,n-j) then xj𝒵1j-1 is an occurrence of term 𝒳 starting with 10 and ending with 1j-1. Thus (∑j′=j𝒳)/xj=𝒯m*(w1,n-j) and ∑j′=j𝒳=xj𝒯m*(w1,n-j).
Now we can partition the weighted circuits of T*(m) of length n by their first indeterminate xj (ignoring the edges of weight 1 preceding this first indeterminate). That is, we can partition the terms of 𝒯m(n) by their first indeterminate xj. So, using the above arguments, we have
(74)𝒯m(n)=∑j=1mjxj𝒯m*(w1,n-j).
Furthermore, 𝒯m*(w1,n-j)=𝒫m*(0,n-j)=fm,n-j(1)*=hn-j; the first equality is Theorem 21, the second is Corollary 11(ii), and the third is by definition of hn. So finally,
(75)tr(Xmn)=𝒯m(n)=∑j=1mjxj𝒯m*(w1,n-j)=∑j=1mjxjhn-j.
Example 34.
See Examples 17 and 26. Here m=3 and n=4:
(76)tr(X34)=𝒯3(4)=x14+4x12x2+4x1x3+2x22=x1(x13+2x1x2+x3)+2x2(x12+x2)+3x3(x1)=x1(f3,3(1)*)+2x2(f3,2(1)*)+3x3(f3,1(1)*)=x1h3+2x2h2+3x3h1,
where, at line 2, we have rearranged the terms according to their first indeterminate xj, using Example 26, and combined like terms.
Remark 35.
From Theorem 25 and our definitions of matrices Ym,n and Xm from Sections 3 and 5.1, respectively, we have the following equalities:
(77)𝒞m*(n)=tr(Ym,n*)=∑j=1m𝒯m*(wj,n),tr(Ym,n*)=tr(Xmn).
Thus, from Theorem 33,
(78)∑j=1m𝒯m*(wj,n)=∑j=1mjxj𝒯m*(w1,n-j).
In Section 7 we specialized by replacing weights xℓ,i with xℓ. In this section we specialize further by replacing all weights xℓ,i with 1. We denote this operation by #. We then use these # matrices to count m-path covers of the path and cycle.
Recall matrix Xm,n from (26), we define matrix Zm:
(79)Zm=Xm,n#=(01·⋯0001⋯0⋮⋮⋮⋮⋮000⋯1111⋯1).
Similarly, let cm(n)=𝒞m#(n) be the expression 𝒞m(n) evaluated when all xℓ,i=1. So Ym,n#=Zmn and cm(n)=tr(Ym,n#)=tr(Zmn). Thus cm(n) counts the number of m-path covers of the weighted C(n) or of an arbitrary n-cycle. (cf., Corollary 11.1, Section 8, Farrell [2].)
Theorem 36.
For 1≤n≤m, one has cm(n)=2n-1.
Proof.
Let [n]={1,2,…,n} and let C[n] denote the cycle whose vertices are the elements of [n] arranged clockwise in a circle. Now n≤m so any path cover of C[n] will be an m-path cover. We show that the number of path covers of C[n] is 2n-1.
Given a subset {i1,i2,…,ik} of [n] with {i1<i2<⋯<ik} we define a path cover [i1,i1+1,…,i2-1],[i2,i2+1,…,i3-1],…,[ik,ik+1,…,i1-1], of C[n]. Conversely, given a path cover [i1,i1+1,…,i2-1],[i2,i2+1,…,i3-1],…,[ik,ik+1,…,i1-1] of C[n] we take the first vertex from each path to form a subset {i1,i2,…,ik} of [n] and then rearrange its elements to form a subset of [n] with increasing elements. These two operations illustrate a bijection from the set of non-empty subsets of [n] to the set of m-path covers of C[n]. Hence cm(n)=2n-1.
From recurrence (2), Lemma 13, and Theorems 16 and 36, for n≥m+1 we see that cm(n) obeys the m-anacci recurrence,
(80)cm(n)=cm(n-1)+cm(n-2)+⋯+cm(n-m)=∑ℓ=1mcm(n-ℓ),
with starting conditions cm(n)=2n-1 for 1≤n≤m.
In the square array (see Table 1) cm(n) is the (n,m) entry, for n,m≥1. Column m is determined by the above m-anacci recurrence. We observe that the (m,m) main diagonal entry is cm(m)=2m-1.
n∖m
1
2
3
4
5
6
7
8
9
10
⋯
1
1
1
1
1
1
1
1
1
1
1
⋯
2
1
3
3
3
3
3
3
3
3
3
⋯
3
1
4
7
7
7
7
7
7
7
7
⋯
4
1
7
11
15
15
15
15
15
15
15
⋯
5
1
11
21
26
31
31
31
31
31
31
⋯
6
1
18
39
51
57
63
63
63
63
63
⋯
7
1
29
71
99
113
120
127
127
127
127
⋯
8
1
47
131
191
223
239
247
255
255
255
⋯
9
1
76
241
367
439
475
493
502
511
511
⋯
10
1
123
443
708
863
943
983
1003
1013
1023
⋯
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮
Consider the triangle, in bold, where cm(n) is the (n,m) entry for all n≥1 and 1≤m≤n; it counts the number of m-path covers of a cycle with n vertices. We have entered the sequence obtained from reading this triangle row-by-row to the Online Encyclopedia of Integer Sequences [9]; it is sequence A185722.
Each of the 10 columns of the square array (see Table 1) appears as a sequence in [9]; for example, the second column (m=2) gives sequence A000204 and the third column (m=3) gives A001644. Thus we have a new combinatorial interpretation for each of these sequences and a connection between them.
A closely related sequence is A126198 (replace “k” by “m” in its description). Let T(n,m) be the (n,m) entry of the triangle corresponding to A126198, then T(n,m) counts the number of compositions of integer n into parts of size ≤m. Now consider n vertices arranged in a path. A composition of n into parts of size ≤m corresponds naturally to an m-path cover of this path with n vertices by identifying a part of size ℓ in the composition with a path of length ℓ in the corresponding m-path cover. This correspondence can also be reversed. Thus in our terminology, T(n,m) is the number of m-path covers of a path with n vertices, and, from Corollary 11(ii) and our operation #, we have T(n,m)=fm,n(1)#=𝒫m#(0,n). The (m,m) main diagonal entry in this triangle is T(m,m)=2m-1 (as is well known, there are 2m-1 compositions of m) and column m of this triangle is determined by the m-anacci recurrence,
(81)T(n,m)=T(n-1,m)+T(n-2,m)+⋯+T(n-m,m)=∑ℓ=1mT(n-ℓ,m),
for n≥m+1, with starting conditions T(n,m)=2n-1 for 1≤n≤m.
The (n,m) entry in our triangle, cm(n), counts the number of m-path covers of a cycle with n vertices. We have starting conditions cm(n)=2n-1 as opposed to T(n,m)=2n-1 above, for 1≤n≤m.
Furthermore, from above and the definition of matrix Ym,n from (28), we have T(n,m)=fm,n(1)#= the (m,m) entry of matrix Ym,n#=Zmn. Thus both
(82)cm(n)=tr(Zmn),T(n,m)=(Zmn)(m,m),
can be obtained from matrix Zmn. This gives a new derivation of T(n,m), and so of sequence A126198.
Example 37.
m=3 and n=4. We have
(83)Z3=(010001111),Z34=(122234467),
gives
(84)c3(4)=tr(Z34)=11,T(4,3)=(Z34)(3,3)=7;
see Examples 17, 26, and 7.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of the paper.
Acknowledgment
The authors thank the referee for bringing to their attention various relevant papers.
FarrellE. J.On a general class of graph polynomialsFarrellE. J.Path decompositions of chains and circuitsChowT. Y.The path-cycle symmetric function of a digraphD'AntonaO. M.MunariniE.The cycle-path indicator polynomial of a digraphMcSorleyJ. P.FeinsilverP.SchottR.Generating orthogonal polynomials and their derivatives using vertex|matching-partitions of graphsJoyalA.Une théorie combinatoire des séries formellesBergeronF.LabelleG.LerouxP.MunariniE.A combinatorial interpretation of the generalized Fibonacci numbersOnline Encyclopedia of Integer Sequences, published electronically, http://oeis.org