(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^2)/(1-2*x-2*x^2) )); // G. C. Greubel, Oct 18 2019
(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^2)/(1-2*x-2*x^2) )); // G. C. Greubel, Oct 18 2019
proposed
approved
editing
proposed
Numbers of straight-chain fatty acids involving oxo groups (or hydroxy groups), if cis-/trans isomerism is considered while stereoisomerism is neglected. - Stefan Schuster, Apr 19, 2018
proposed
editing
editing
proposed
G. C. Greubel, <a href="/A052945/b052945.txt">Table of n, a(n) for n = 0..1000</a>
G.f.: (-1 + - x)*(1 + x)/(-1 + - 2*x + - 2*x^2).
Recurrence: a(0)=1, a(1)=2, a(2)=5; for n>2, 2*a(n) + 2*a(n+1) - a(n+2).
a(n) = 2*(a(n-1) + a(n-2)).
a(n) = Sum(1/4*_alpha^(-1-n), __{alpha=RootOf(-1+2*_Zz+2*_Z2z^2)} alpha^(-1-n)/4.
spec := [S, {S=Sequence(Prod(Union(Sequence(Prod(Z, Z)), Sequence(Z)), Z))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
seq(coeff(series((1-x^2)/(1-2*x-2*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 18 2019
Join[{a=1}, b=1; Table[c=(a+b)*2; a=b; b=c, {n, 0, 20}]/2] (* Vladimir Joseph Stephan Orlovsky, Nov 22 2010 *)
LinearRecurrence[{2, 2, }, {1, 2, 5}, 30] (* G. C. Greubel, Oct 18 2019 *)
(PARI) Vec((x-1)*(1+x)/(-1+2*x+2*x^2)+O(x^9930)) \\ Charles R Greathouse IV, Nov 20 2011
(MAGMA) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^2)/(1-2*x-2*x^2) )); // G. C. Greubel, Oct 18 2019
(Sage)
def A052945_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-x^2)/(1-2*x-2*x^2) ).list()
A052945_list(30) # G. C. Greubel, Oct 18 2019
(GAP) a:=[2, 5];; for n in [3..30] do a[n]:=2*(a[n-1]+a[n-2]); od; Concatenation([1], a); # G. C. Greubel, Oct 18 2019
approved
editing
proposed
approved
editing
proposed
First binomial transform of 2, 3, 6, 9, 18, 27, 54, 81, ... starting after 1. (End)
proposed
editing
editing
proposed