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.

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

Original entry on oeis.org

1, 3, 11, 40, 146, 533, 1946, 7105, 25941, 94713, 345806, 1262570, 4609761, 16830668, 61450341, 224360935, 819162731, 2990839648, 10919834926, 39869337325, 145566674726, 531477526653, 1940474094561, 7084852176865
Offset: 0

Views

Author

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

Keywords

Comments

a(n) = term (3,1) in M^n, M = the 3 X 3 matrix [1,1,2; 1,2,1; 1,1,1]. - Gary W. Adamson, Mar 12 2009

Programs

  • GAP
    a:=[1,3,11];; for n in [4..30] do a[n]:=4*a[n-1]-a[n-2]-a[n-3]; od; a; # G. C. Greubel, Oct 18 2019
  • Magma
    I:=[1, 3, 11]; [n le 3 select I[n] else 4*Self(n-1)-Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
    
  • Maple
    spec:= [S,{S=Sequence(Union(Z,Z,Prod(Union(Sequence(Z),Z),Z)))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(coeff(series((1-x)/(1-4*x+x^2+x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 18 2019
  • Mathematica
    LinearRecurrence[{4,-1,-1},{1,3,11},30] (* Vincenzo Librandi, Jun 22 2012 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-4*x+x^2+x^3)) \\ Altug Alkan, Sep 21 2018
    
  • Sage
    def A052941_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-x)/(1-4*x+x^2+x^3)).list()
    A052941_list(30) # G. C. Greubel, Oct 18 2019
    

Formula

G.f.: (1-x)/(1 - 4*x + x^2 + x^3).
a(n) = 4*a(n-1) - a(n-2) - a(n-3).
a(n) = Sum_{alpha=RootOf(1-4*z+z^2+z^3)} (3-alpha^2)*alpha^(-1-n)/13.
a(n) = (b(n+2) - b(n+1) + b(n))/13, where b(n) = A356463(n). - Ding Hao, Aug 08 2022

Extensions

More terms from James Sellers, Jun 06 2000

A356411 Sum of powers of roots of x^3 - x^2 - x - 3.

Original entry on oeis.org

3, 1, 3, 13, 19, 41, 99, 197, 419, 913, 1923, 4093, 8755, 18617, 39651, 84533, 180035, 383521, 817155, 1740781, 3708499, 7900745, 16831587, 35857829, 76391651, 162744241, 346709379, 738628573, 1573570675, 3352327385, 7141783779
Offset: 0

Views

Author

Greg Dresden, Aug 05 2022

Keywords

Comments

a(n) is the sum of the n-th powers of the three roots of x^3 - x^2 - x - 3. These roots are c1 = 2.130395..., c2 = -0.5651977... - i*1.0434274..., and c3 = -0.5651977... + i*1.0434274..., and so a(n) = c1^n + c2^n + c3^n. The real parts of c2 and c3 are A273065.
a(n) can also be determined by Vieta's formulas and Newton's identities. For example, a(3) by definition is c1^3 + c2^3 + c3^3, and from Newton's identities this equals e1^3 - 3*e1*e2 + 3*e3 for e1, e2, e3 the elementary symmetric polynomials of x^3 - x^2 - x - 3. From Vieta's formulas we have e1 = 1, e2 = -1, and e3 = 3, giving us e1^3 - 3*e1*e2 + 3*e3 = 1 + 3 + 9 = 13, as expected.

Examples

			For n=3, a(3) = (2.130395...)^3 + (-0.5651977... - i*1.0434274...)^3 + (-0.5651977... + i*1.0434274...)^3 = 13.
		

Crossrefs

Cf. A103143, A123102, A247594, A356463, A273065 (Re c2,c3).

Programs

  • Mathematica
    LinearRecurrence[{1, 1, 3}, {3, 1, 3}, 40]
  • PARI
    polsym(x^3 - x^2 - x - 3, 35) \\ Joerg Arndt, Aug 11 2022

Formula

a(n) = a(n-1) + a(n-2) + 3*a(n-3) with a(0)=3, a(1)=1, a(2) = 3.
G.f.: (3 - 2*x - x^2)/(1 - x - x^2 - 3*x^3).
Showing 1-2 of 2 results.