Thursday, January 19, 2012

Matrix generation of sequences

Observe the following infinite square production matrix:
1, 1, 0, 0, 0, 0,...
A, 0, 1, 0, 0, 0,...
B, 0, 0, 1, 0, 0,..
C, 0, 0, 0, 1, 0,...
D, 0, 0, 0, 0, 1,...
...
Say we have a finite (A,B,C) = (1, 1, 2). Then the g.f. (generating function) is:
1/(1-Ax-Bx^2-Cx^3) = 1/(1-x-x^2-2x^3) and the recursive relationship is:
a(n) = A*a(n-1) + B*a(n-2) + C *a(n-3).
The matrix generator is:
1, 1, 0
1, 0, 1
2, 0, 0
= M.
Any of these methods generates A077947: (1, 2, 5, 9, 18, 37, 73,...) as follows:
First, we plug in 1/(1-x-x^2-2x^3) into WolframAlpha, enter, and up comes the sequence.
By recursion, 18 = 1*9 + 1*5 + 2*2 = 9 + 5 = 4; or, a(n) = 1*a(n-1) + 1*a(n-2) * 2*a(n-3).
Or, let the Matrix = M, then take successive powers * the vector
[1
0
0]
...accessing top term; thus a(n) = M^n*[1,0,0], top term. Note that we extract the generating matrix M from the infinite square production matrix, such that M is an n*n matrix depending on the numbers of terms in (A,B,C...). That is, 3 in this case.

No comments:

Post a Comment