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 A123877 #23 Sep 08 2022 08:45:28 %S A123877 1,-1,0,3,-9,18,-27,27,0,-81,243,-486,729,-729,0,2187,-6561,13122, %T A123877 -19683,19683,0,-59049,177147,-354294,531441,-531441,0,1594323, %U A123877 -4782969,9565938,-14348907,14348907,0,-43046721 %N A123877 Expansion of (1+2*x)/(1+3*x+3*x^2). %C A123877 Row sums of number triangle A123876. %H A123877 G. C. Greubel, <a href="/A123877/b123877.txt">Table of n, a(n) for n = 0..1000</a> %H A123877 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-3,-3). %F A123877 a(n) = Sum_{k=0..n} (-1)^(n-k)*C(n,k)*(cos(2*Pi*k/3) + sin(2*Pi*k/3)/sqrt(3)). %F A123877 G.f.: G(0)*(1+2*x)/(2+3*x), where G(k)= 1 + 1/(1 - x*(k+3)/(x*(k+4) - 2/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Jun 16 2013 %F A123877 E.g.f.: (1/3)*exp(-3*x/2)*(3*cos((sqrt(3)*x)/2) + sqrt(3)*sin((sqrt(3)*x)/2)). - _Stefano Spezia_, Aug 08 2019 %p A123877 seq(coeff(series((1+2*x)/(1+3*x+3*x^2), x, n+1), x, n), n = 0..40); # _G. C. Greubel_, Aug 08 2019 %t A123877 CoefficientList[Series[(1+2x)/(1+3x+3x^2),{x,0,40}],x] (* or *) LinearRecurrence[{-3,-3},{1,-1},40] (* _Harvey P. Dale_, Dec 17 2017 *) %o A123877 (PARI) my(x='x+O('x^40)); Vec((1+2*x)/(1+3*x+3*x^2)) \\ _G. C. Greubel_, Aug 08 2019 %o A123877 (Magma) I:=[1,-1]; [n le 2 select I[n] else -3*(Self(n-1)+Self(n-2)): n in [1..30]]; // _G. C. Greubel_, Aug 08 2019 %o A123877 (Sage) %o A123877 def A123877_list(prec): %o A123877 P.<x> = PowerSeriesRing(ZZ, prec) %o A123877 return P((1+2*x)/(1+3*x+3*x^2)).list() %o A123877 A123877_list(40) # _G. C. Greubel_, Aug 08 2019 %o A123877 (GAP) a:=[1,-1];; for n in [3..40] do a[n]:=-3*(a[n-1]+a[n-2]); od; a; # _G. C. Greubel_, Aug 08 2019 %Y A123877 Cf. A123876. %K A123877 easy,sign %O A123877 0,4 %A A123877 _Paul Barry_, Oct 16 2006