A102105 a(n) = (19*5^n - 16*3^n + 1) / 4.
1, 12, 83, 486, 2645, 13872, 71303, 362346, 1829225, 9198612, 46150523, 231225006, 1157542205, 5791962552, 28972567343, 144901100466, 724620293585, 3623445841692, 18118262329763, 90594411012726, 452981353155365, 2264934660052032, 11324756983085783
Offset: 0
Examples
a(4) = 2645 = 9*486 - 23*83 + 15*12 = 9*a(3) - 23*a(2) + 15*a(1). a(4) = 2645 since M^4 * {1, 1, 1} = {1, 161, 2645}, where 161 = A048473(4).
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (9,-23,15).
Programs
-
GAP
List([0..30], n-> (19*5^n -16*3^n +1)/4); # G. C. Greubel, Oct 27 2019
-
Magma
[(19*5^n -16*3^n +1)/4: n in [0..30]]; // G. C. Greubel, Oct 27 2019
-
Maple
with(linalg): M[1]:=matrix(3,3,[1,0,0,2,3,0,3,4,5]): for n from 2 to 23 do M[n]:=multiply(M[1],M[n-1]) od: 1,seq(multiply(M[n],matrix(3,1,[1,1,1]))[3,1],n=1..23); seq((19*5^n -16*3^n +1)/4, n=0..30); # G. C. Greubel, Oct 27 2019
-
Mathematica
Table[(19*5^n -16*3^n +1)/4, {n,0,30}] (* G. C. Greubel, Oct 27 2019 *) LinearRecurrence[{9,-23,15},{1,12,83},30] (* Harvey P. Dale, Sep 19 2021 *)
-
PARI
Vec((1 + 3*x - 2*x^2) / ((1 - x)*(1 - 3*x)*(1 - 5*x)) + O(x^30)) \\ Colin Barker, Mar 03 2017
-
Sage
[(19*5^n -16*3^n +1)/4 for n in (0..30)] # G. C. Greubel, Oct 27 2019
Formula
a(n) = 9*a(n-1) - 23*a(n-2) + 15*a(n-3), a(0)=1,a(1)=12,a(2)=83 (derived from the minimal polynomial of the matrix M).
G.f.: (1 + 3*x - 2*x^2) / ((1 - x)*(1 - 3*x)*(1 - 5*x)). - Colin Barker, Mar 03 2017
E.g.f.: (exp(x) - 16*exp(3*x) + 19*exp(5*x))/4. - G. C. Greubel, Oct 27 2019
Extensions
Corrected by T. D. Noe, Nov 07 2006
Edited by N. J. A. Sloane, Dec 02 2006
New definition from Ralf Stephan, May 17 2007
Comments