OFFSET
1,2
COMMENTS
A sequence generated from a rotated Stirling number of the second kind matrix.
REFERENCES
R. Aldrovandi, "Special Matrices of Mathematical Physics," World Scientific, 2001, Section 13.3.1 "Inverting Bell Matrices", p. 171.
LINKS
FORMULA
a(n+3) = 2*a(n+2) + 3*a(n+1) - a(n), with a(1) = 1, a(2) = 3, a(3) = 8.
M = [1 1 1 / 3 1 0 / 1 0 0], a rotation of a Stirling number of the second kind matrix [1 0 0 / 1 1 0 / 1 3 1]; then M^n * [1 1 1] = [a(n+1), A095126(n) a(n)].
EXAMPLE
a(5) = 69 = 2*a(4) + 3*a(3) - a(2) = 2*24 + 3*8 - 3.
a(5) = 69 since M^5 * [1 1 1] = [202 316 69] = [a(6) A095126(a) a(5)].
MATHEMATICA
a[n_] := (MatrixPower[{{1, 1, 1}, {3, 1, 0}, {1, 0, 0}}, n].{{1}, {1}, {1}})[[3, 1]]; Table[ a[n], {n, 25}] (* Robert G. Wilson v, Jun 01 2004 *)
LinearRecurrence[{2, 3, -1}, {1, 3, 8}, 30] (* Harvey P. Dale, Nov 13 2011 *)
PROG
(PARI) Vec((1+x-x^2)/(1-2*x-3*x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 25 2012
(Magma) I:=[1, 3, 8]; [n le 3 select I[n] else 2*Self(n-1)+3*Self(n-2)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jul 25 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, May 29 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jun 01 2004
Definition corrected by Harvey P. Dale, Nov 13 2011
a(27)-a(29) from Vincenzo Librandi, Jul 25 2015
STATUS
approved