[go: up one dir, main page]

login
A052937
Expansion of (2-3*x-x^2)/((1-x)*(1-2*x-x^2)).
4
2, 3, 6, 13, 30, 71, 170, 409, 986, 2379, 5742, 13861, 33462, 80783, 195026, 470833, 1136690, 2744211, 6625110, 15994429, 38613966, 93222359, 225058682, 543339721, 1311738122, 3166815963, 7645370046, 18457556053, 44560482150, 107578520351, 259717522850
OFFSET
0,1
FORMULA
G.f.: (2-3*x-x^2)/((1-x)*(1-2*x-x^2)).
a(n) = 2*a(n-1) + a(n-2) - 2, with a(0)=2, a(1)=3, a(2)=6.
a(n) = 1 + Sum_{alpha=RootOf(-1+2*z+z^2)} (1 + alpha)*alpha^(-1-n)/4.
a(n) = A000129(n+1) + 1, where A000129 are the Pell Numbers. - Graeme McRae, Aug 03 2006
a(n) = (1 + (-(1-sqrt(2))^(1+n) + (1+sqrt(2))^(1+n))/(2*sqrt(2))). - Colin Barker, Mar 16 2016
MAPLE
spec:= [S, {S=Union(Sequence(Z), Sequence(Union(Z, Z, Prod(Z, Z))))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
seq(coeff(series((2-3*x-x^2)/((1-x)*(1-2*x-x^2)), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 18 2019
MATHEMATICA
CoefficientList[Series[(2-3x-x^2)/((1-x)(1-2x-x^2)), {x, 0, 30}], x] (* or *) LinearRecurrence[{3, -1, -1}, {2, 3, 6}, 40] (* Harvey P. Dale, May 27 2017 *)
1+Fibonacci[Range[31], 2] (* G. C. Greubel, Oct 18 2019 *)
PROG
(PARI) Vec((2-3*x-x^2)/((1-x)*(1-2*x-x^2)) + O(x^50)) \\ Colin Barker, Mar 16 2016
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (2-3*x-x^2)/((1-x)*(1-2*x-x^2)) )); // G. C. Greubel, Oct 18 2019
(Sage) [1 + lucas_number1(n+1, 2, -1) for n in (0..30)] # G. C. Greubel, Oct 18 2019
(GAP) a:=[2, 3, 6];; for n in [4..30] do a[n]:=3*a[n-1]-a[n-2]-a[n-3]; od; a; # G. C. Greubel, Oct 18 2019
CROSSREFS
Sequence in context: A079512 A280746 A174191 * A005554 A316766 A300660
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved