|
|
|
|
1, 1, 9, 33, 145, 609, 2585, 10945, 46369, 196417, 832041, 3524577, 14930353, 63245985, 267914297, 1134903169, 4807526977, 20365011073, 86267571273, 365435296161, 1548008755921, 6557470319841, 27777890035289, 117669030460993, 498454011879265, 2111485077978049
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = +3*a(n-1) +5*a(n-2) +a(n-3). - R. J. Mathar, Dec 17 2010
G.f.: (1-x)^2 / ( (1+x)*(1-4*x-x^2) ). - R. J. Mathar, Dec 17 2010
a(n) = ((-1)^n + (-(2-sqrt(5))^n + (2+sqrt(5))^n) / sqrt(5)). - Colin Barker, Jun 06 2017
|
|
MATHEMATICA
|
LinearRecurrence[{3, 5, 1}, {1, 1, 9}, 30] (* or *) CoefficientList[Series[ (1-x)^2/((1+x)(1-4*x-x^2)), {x, 0, 30}], x] (* Harvey P. Dale, Jun 20 2011 *)
|
|
PROG
|
(PARI) Vec((1-x)^2/((1+x)*(1-4*x-x^2)) + O(x^30)) \\ Colin Barker, Jun 06 2017
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)^2/((1+x)*(1-4*x-x^2)) )); // G. C. Greubel, Jun 08 2019
(Sage) ((1-x)^2/((1+x)*(1-4*x-x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 08 2019
(GAP) a:=[1, 1, 9];; for n in [4..30] do a[n]:=3*a[n-1]+5*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jun 08 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|