A074582 a(n) = S(3n), where S(n) is the generalized tribonacci sequence A001644.
3, 7, 39, 241, 1499, 9327, 58035, 361109, 2246915, 13980895, 86992799, 541292033, 3368061131, 20956960551, 130399710235, 811381230021, 5048627019523, 31413882696791, 195465425009943, 1216237188605169, 7567747077883259
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7,-5,1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (3-14*x+5*x^2)/(1-7*x+5*x^2-x^3) )); // G. C. Greubel, Apr 13 2019 -
Mathematica
CoefficientList[Series[(3-14*x+5*x^2)/(1-7*x+5*x^2-x^3), {x, 0, 30}], x] LinearRecurrence[{7,-5,1},{3,7,39},30] (* Harvey P. Dale, Mar 24 2022 *)
-
PARI
my(x='x+O('x^30)); Vec((3-14*x+5*x^2)/(1-7*x+5*x^2-x^3)) \\ G. C. Greubel, Apr 13 2019
-
Sage
((3-14*x+5*x^2)/(1-7*x+5*x^2-x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Apr 13 2019
Formula
a(n) = 7*a(n-1) - 5*a(n-2) + a(n-3), a(0)=3, a(1)=7, a(2)=39.
G.f.: (3-14*x+5*x^2)/(1-7*x+5*x^2-x^3).