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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

1, 2, 7, 21, 66, 205, 639, 1990, 6199, 19309, 60146, 187349, 583575, 1817782, 5662223, 17637301, 54938562, 171128541, 533049583, 1660400166, 5171992999, 16110279997, 50182032658, 156312391973, 486898648583, 1516644272406
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,2,7];; for n in [4..30] do a[n]:=3*a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Oct 15 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-3*x-x^2+2*x^3) )); // G. C. Greubel, Oct 15 2019
    
  • Maple
    spec := [S,{S=Sequence(Union(Z,Prod(Union(Sequence(Z),Z,Z),Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    LinearRecurrence[{3,1,-2}, {1,2,7}, 30] (* G. C. Greubel, Oct 15 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-3*x-x^2+2*x^3)) \\ G. C. Greubel, Oct 15 2019
    
  • Sage
    def A052911_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-x)/(1-3*x-x^2+2*x^3)).list()
    A052911_list(30) # G. C. Greubel, Oct 15 2019
    

Formula

G.f.: (1-x)/(1 - 3*x - x^2 + 2*x^3)
a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3).
a(n) = Sum_{alpha=RootOf(1 - 3*z - z^2 + 2*z^3)} (1/229)*(43 + 41*alpha - 46*alpha^2)*alpha^(-1-n).
a(n) = center term in M^n * [1 1 1] where M = Hosoya's triangle considered as an upper triangular 3 X 3 matrix: [2 1 2 / 1 1 0 / 1 0 0]. E.g., a(4) = 66 since M^4 * [1 1 1] = [139 66 45]. The analogous procedure using M^n * [1 0 0] generates A100058. - Gary W. Adamson, Oct 31 2004
a(n) = A100058(n) - A100058(n-1). - R. J. Mathar, May 04 2018

Extensions

More terms from James Sellers, Jun 06 2000

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

Original entry on oeis.org

1, 3, 10, 31, 97, 302, 941, 2931, 9130, 28439, 88585, 275934, 859509, 2677291, 8339514, 25976815, 80915377, 252043918, 785093501, 2445493667, 7617486666, 23727766663, 73909799321, 230222191294, 717120839877, 2233765112283
Offset: 0

Views

Author

Gary W. Adamson, Oct 31 2004

Keywords

Comments

a(n)/a(n-1) tends to 3.1149075414..., which is an eigenvalue of the matrix M and a root of the characteristic polynomial x^3 - 3x^2 - x + 2.

Examples

			a(5) = 97, center term in M^5 * [1 0 0]: [205 97 66].
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.

Crossrefs

Partial sums of A052911. Cf. A019481, A052550, A052939, A100059, A058071.

Programs

  • Mathematica
    CoefficientList[Series[1/(1 - 3x - x^2 + 2x^3), {x, 0, 25}], x] (* Or *)
    Table[(MatrixPower[{{2, 1, 2}, {1, 1, 0}, {1, 0, 0}}, n].{1, 0, 0})[[2]], {n, 26}] (* Robert G. Wilson v, Nov 04 2004 *)
    LinearRecurrence[{3,1,-2},{1,3,10},30] (* Harvey P. Dale, Mar 28 2012 *)
  • PARI
    Vec(1/(1-3*x-x^2+2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

Recurrence: a(0) = 1, a(1) = 3, a(2) = 10; a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3).
Given Hosoya's triangle: 1; 1, 1; 2, 1, 2; considered as an upper triangular 3 X 3 matrix M: [2 1 2 / 1 1 0 / 1 0 0]; a(n) = center term in M^n * [1 0 0].

Extensions

Edited by Ralf Stephan, Nov 02 2004
Corrected and extended by Robert G. Wilson v, Nov 04 2004
Showing 1-2 of 2 results.