login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052925 Expansion of (2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2)). 2
2, 2, 4, 9, 22, 56, 145, 378, 988, 2585, 6766, 17712, 46369, 121394, 317812, 832041, 2178310, 5702888, 14930353, 39088170, 102334156, 267914297, 701408734, 1836311904, 4807526977, 12586269026, 32951280100, 86267571273 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
G.f.: (2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2)).
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3), with a(0)=2, a(1)=2, a(2)=4, a(3)=9.
a(n) = 1 + Sum_{alpha=RootOf(1-3*z+z^2)} (1/5)*(2-3*alpha)*alpha^(-1-n).
MAPLE
spec:=[S, {S=Union(Sequence(Z), Sequence(Prod(Sequence(Z), Sequence(Z), Z) ))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
seq(coeff(series((2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2)), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 17 2019
MATHEMATICA
CoefficientList[Series[(-2+6*x-4*x^2+x^3)/(-1+x)/(1-3*x+x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 22 2012 *)
LinearRecurrence[{4, -4, 1}, {2, 2, 4, 9}, 30] (* G. C. Greubel, Oct 17 2019 *)
PROG
(Magma) I:=[2, 2, 4, 9]; [n le 4 select I[n] else 4*Self(n-1)-4*Self(n-2) +Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
(PARI) my(x='x+O('x^30)); Vec((2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2))) \\ G. C. Greubel, Oct 17 2019
(Sage)
def A052925_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((2-6*x+4*x^2-x^3)/((1-x)*(1-3*x+x^2))).list()
A052925_list(30) # G. C. Greubel, Oct 17 2019
(GAP) a:=[2, 4, 9];; for n in [4..30] do a[n]:=4*a[n-1]-4*a[n-2]+a[n-3]; od; Concatenation([2], a); # G. C. Greubel, Oct 17 2019
CROSSREFS
Apart from first term, same as A055588.
Sequence in context: A365091 A246789 A166022 * A006182 A267339 A308434
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 15:37 EDT 2024. Contains 372197 sequences. (Running on oeis4.)