|
|
A123950
|
|
Expansion of g.f.: x^2*(1-2*x) / (1-3*x-3*x^2+2*x^3).
|
|
1
|
|
|
0, 1, 1, 6, 19, 73, 264, 973, 3565, 13086, 48007, 176149, 646296, 2371321, 8700553, 31923030, 117128107, 429752305, 1576795176, 5785386229, 21227039605, 77883687150, 285761407807, 1048481205661, 3846960466104, 14114802199681, 51788325586033
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
REFERENCES
|
Chang and Sederberg, Over and Over Again, MAA, 1997, Chapter 30
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 3*a(n-1) + 3*a(n-2) - 2*a(n-3).
|
|
MAPLE
|
seq(coeff(series(x^2*(1-2*x)/(1-3*x-3*x^2+2*x^3), x, n+1), x, n), n = 1 .. 30); # Muniru A Asiru, Oct 21 2018
|
|
MATHEMATICA
|
M = {{0, 0, 1}, {0, 2, -2}, {1, -2, 1}}; v[1] = {0, 0, 1}; v[n_]:=v[n]=M.v[n-1]; Table[v[n][[1]], {n, 30}]
CoefficientList[Series[x^2*(1-2*x)/(1-3*x-3*x^2+2*x^3), {x, 0, 30}], x] (* G. C. Greubel, Aug 05 2019 *)
|
|
PROG
|
(PARI) concat(0, Vec(-x^2*(2*x-1)/(2*x^3-3*x^2-3*x+1)+O(x^130))) \\ Colin Barker, Feb 10 2015
(GAP) a:=[0, 1, 1];; for n in [4..30] do a[n]:=3*a[n-1]+3*a[n-2]-2*a[n-3]; od; a; # Muniru A Asiru, Oct 21 2018
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); [0] cat Coefficients(R!( x^2*(1-2*x)/(1-3*x-3*x^2+2*x^3) )); // G. C. Greubel, Aug 05 2019
(Sage) a=(x^2*(1-2*x)/(1-3*x-3*x^2+2*x^3)).series(x, 30).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Aug 05 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Definition replaced with the generating function by the Assoc. Eds. of the OEIS, Mar 28 2010
|
|
STATUS
|
approved
|
|
|
|