This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A077942 #19 Sep 08 2022 08:45:08 %S A077942 1,2,3,2,-3,-14,-29,-38,-19,58,211,402,477,130,-1021,-3126,-5491, %T A077942 -5814,115,17026,45565,73874,68131,-28742,-273363,-654246,-977645, %U A077942 -754318,777501,4264610,9260355,12701098,7612621,-15996566,-65007949,-129244574,-161488067,-63715662,292545891 %N A077942 Expansion of 1/(1-2*x+x^2+2*x^3). %H A077942 G. C. Greubel, <a href="/A077942/b077942.txt">Table of n, a(n) for n = 0..1000</a> %H A077942 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,-2). %F A077942 a(n) = (-1)^n * A077989(n). - _G. C. Greubel_, Aug 05 2019 %F A077942 a(n) = Sum_{k=0..(n+1)/2} binomial(n+1-k,2k+1)*(-2)^k, n>=0. - _Taras Goy_, Apr 15 2020 %p A077942 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 %t A077942 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 *) %o A077942 (PARI) Vec(1/(1-2*x+x^2+2*x^3)+O(x^40)) \\ _Charles R Greathouse IV_, Sep 27 2012 %o A077942 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/(1-2*x+x^2+2*x^3) )); // _G. C. Greubel_, Aug 05 2019 %o A077942 (Sage) (1/(1-2*x+x^2+2*x^3)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, Aug 05 2019 %o A077942 (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 %Y A077942 Cf. A077989. %K A077942 sign,easy %O A077942 0,2 %A A077942 _N. J. A. Sloane_, Nov 17 2002