OFFSET
2,2
REFERENCES
G. Rucker and C. Rucker, Walk counts, labyrinthicity and complexity of acyclic and cyclic graphs and molecules, J. Chem. Inf. Comput. Sci., 40 (2000), 99-106.
FORMULA
It is known that if A is the adjacency matrix of a graph G, then the (i,j)-entry of the matrix A^k is equal to the number of walks from vertex i to vertex j. Consequently, T(n,k) is 1/2 of the sum of the entries of the matrix A^k (see the Maple program).
EXAMPLE
T(3,1)=2 and T(3,2)=3 because in the path a - b - c we have 4 walks of length 1 (ab, bc, ba, cb) and 6 walks of length 2 (aba, abc, bab, bcb, cbc, cba).
Triangle starts:
1;
2,3;
3,5,8;
4,7,12,21;
5,9,16,29,52;
MAPLE
with(GraphTheory): T := proc (n, k) local G, A, B: G := PathGraph(n): A := AdjacencyMatrix(G): B := A^k: if k < n then (1/2)*add(add(B[i, j], i = 1 .. n), j = 1 .. n) else 0 end if end proc: for n from 2 to 12 do seq(T(n, k), k = 1 .. n-1) end do; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Dec 01 2011
EXTENSIONS
Keyword tabl added by Michel Marcus, Apr 09 2013
STATUS
approved