A127222 a(n) = 3^n*pentanacci(n) or (3^n)*A023424(n-1).
3, 27, 189, 1215, 7533, 41553, 247131, 1463103, 8640837, 50959287, 300264165, 1771292853, 10447598619, 61618989627, 363414767589, 2143339285311, 12641143135581, 74555586323649, 439717218548643, 2593383067853775, 15295369041550269, 90209719910309895
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (3,9,27,81,243).
Crossrefs
Programs
-
Magma
I:=[3, 27, 189, 1215, 7533]; [n le 5 select I[n] else 3*Self(n-1) + 9*Self(n-2) + 27*Self(n-3) + 81*Self(n-4) + 243*Self(n-5): n in [1..30]]; // G. C. Greubel, Dec 19 2017
-
Mathematica
Table[Tr[MatrixPower[3*{{1, 1, 1, 1, 1}, {1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}}, x]], {x, 1, 20}] LinearRecurrence[{3, 9, 27, 81, 243}, {3, 27, 189, 1215, 7533}, 50] (* G. C. Greubel, Dec 19 2017 *)
-
PARI
x='x+O('x^30); Vec(-3*x*(1 +6*x +27*x^2 +108*x^3 +405*x^4)/(-1 +3*x +9*x^2 +27*x^3 +81*x^4 +243*x^5)) \\ G. C. Greubel, Dec 19 2017
Formula
a(n) = Trace of matrix [({3,3,3,3,3},{3,0,0,0,0},{0,3,0,0,0},{0,0,3,0,0},{0,0,0,3,0})^n].
a(n) = 3^n * Trace of matrix [({1,1,1,1,1},{1,0,0,0,0},{0,1,0,0,0},{0,0,1,0,0},{0,0,0,1,0})^n].
G.f.: -3*x*(1 +6*x +27*x^2 +108*x^3 +405*x^4)/(-1 +3*x +9*x^2 +27*x^3 +81*x^4 +243*x^5). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 28 2009
a(n) = 3*a(n-1)+9*a(n-2)+27*a(n-3)+81*a(n-4)+243*a(n-5). - Colin Barker, Sep 02 2013
Extensions
G.f. proposed by Maksym Voznyy checked and corrected by R. J. Mathar, Sep 16 2009
Definition corrected by R. J. Mathar, Sep 17 2009
More terms from Colin Barker, Sep 02 2013