cp's OEIS Frontend

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.

A123891 Expansion of (1-3*x^2+x^3)/(1-3*x+x^3).

This page as a plain text file.
%I A123891 #23 Sep 08 2022 08:45:28
%S A123891 1,3,6,18,51,147,423,1218,3507,10098,29076,83721,241065,694119,
%T A123891 1998636,5754843,16570410,47712594,137382939,395578407,1139022627,
%U A123891 3279684942,9443476419,27191406630,78294534948,225440128425,649128978645,1869092400987,5381837074536
%N A123891 Expansion of (1-3*x^2+x^3)/(1-3*x+x^3).
%D A123891 A. Burstein and T. Mansour, Words restricted by 3-letter ..., Annals. Combin., 7 (2003), 1-14.
%H A123891 G. C. Greubel, <a href="/A123891/b123891.txt">Table of n, a(n) for n = 0..1000</a>
%H A123891 A. Burstein and T. Mansour, <a href="https://arxiv.org/abs/math/0112281">Words restricted by 3-letter generalized multipermutation patterns</a>, arXiv:math/0112281 [math.CO], 2001.
%H A123891 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-1).
%F A123891 a(n) = 3*A052536(n-1), n>0. - _R. J. Mathar_, Sep 27 2014
%p A123891 seq(coeff(series((1-3*x^2+x^3)/(1-3*x+x^3), x, n+1), x, n), n = 0..40); # _G. C. Greubel_, Aug 07 2019
%t A123891 Join[{1}, LinearRecurrence[{3, 0, -1}, {3, 6, 18}, 28]] (* _Jean-François Alcover_, Oct 08 2018 *)
%t A123891 CoefficientList[Series[(1-3x^2+x^3)/(1-3x+x^3),{x,0,40}],x] (* _Harvey P. Dale_, Jan 16 2022 *)
%o A123891 (PARI) my(x='x+O('x^30)); Vec((1-3*x^2+x^3)/(1-3*x+x^3)) \\ _G. C. Greubel_, Aug 07 2019
%o A123891 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-3*x^2+x^3)/(1-3*x+x^3) )); // _G. C. Greubel_, Aug 07 2019
%o A123891 (Sage) ((1-3*x^2+x^3)/(1-3*x+x^3)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Aug 07 2019
%o A123891 (GAP) a:=[3,6,18];; for n in [4..30] do a[n]:=3*a[n-1]-a[n-3]; od; Concatenation([1], a); # _G. C. Greubel_, Aug 07 2019
%Y A123891 Cf. A052536.
%K A123891 nonn
%O A123891 0,2
%A A123891 _N. J. A. Sloane_, Nov 20 2006