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!)
A077942 Expansion of 1/(1-2*x+x^2+2*x^3). 3
1, 2, 3, 2, -3, -14, -29, -38, -19, 58, 211, 402, 477, 130, -1021, -3126, -5491, -5814, 115, 17026, 45565, 73874, 68131, -28742, -273363, -654246, -977645, -754318, 777501, 4264610, 9260355, 12701098, 7612621, -15996566, -65007949, -129244574, -161488067, -63715662, 292545891 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = (-1)^n * A077989(n). - G. C. Greubel, Aug 05 2019
a(n) = Sum_{k=0..(n+1)/2} binomial(n+1-k,2k+1)*(-2)^k, n>=0. - Taras Goy, Apr 15 2020
MAPLE
seq(coeff(series(1/(1-2*x+x^2+2*x^3), x, n+1), x, n), n = 0..40); # G. C. Greubel, Aug 05 2019
MATHEMATICA
LinearRecurrence[{2, -1, -2}, {1, 2, 3}, 40] (* or *) CoefficientList[Series[ 1/(1-2*x+x^2+2*x^3), {x, 0, 40}], x] (* G. C. Greubel, Aug 05 2019 *)
PROG
(PARI) Vec(1/(1-2*x+x^2+2*x^3)+O(x^40)) \\ Charles R Greathouse IV, Sep 27 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/(1-2*x+x^2+2*x^3) )); // G. C. Greubel, Aug 05 2019
(Sage) (1/(1-2*x+x^2+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Aug 05 2019
(GAP) a:=[1, 2, 3];; for n in [4..40] do a[n]:=2*a[n-1]-a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Aug 05 2019
CROSSREFS
Cf. A077989.
Sequence in context: A183465 A223168 A322404 * A077989 A109620 A138781
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
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 June 27 02:41 EDT 2024. Contains 373723 sequences. (Running on oeis4.)