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-3 of 3 results.

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

Original entry on oeis.org

1, -2, 4, -6, 8, -8, 4, 8, -32, 72, -128, 192, -240, 224, -64, -352, 1152, -2432, 4160, -6016, 7168, -6016, 0, 14336, -40704, 81408, -134144, 186880, -210944, 153600, 66560, -555008, 1417216, -2701312, 4292608, -5750784, 6098944, -3612672, -4276224, 20750336, -48726016, 88899584
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,-2,4];; for n in [4..50] do a[n]:=-2*a[n-1]+2*a[n-3]; od; a; # G. C. Greubel, Jun 25 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1+2*x-2*x^3) )); // G. C. Greubel, Jun 25 2019
    
  • Mathematica
    LinearRecurrence[{-2, 0, 2}, {1, -2, 4}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
    CoefficientList[Series[1/(1+2x-2x^3),{x,0,50}],x] (* Harvey P. Dale, May 21 2024 *)
  • PARI
    my(x='x+O('x^50)); Vec(1/(1+2*x-2*x^3)) \\ G. C. Greubel, Jun 25 2019
    
  • Sage
    (1/(1+2*x-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 25 2019
    

Formula

a(n) = (-1)^n * A077940(n). - G. C. Greubel, Jun 25 2019

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

Original entry on oeis.org

1, 0, 0, -2, -4, -8, -12, -16, -16, -8, 16, 64, 144, 256, 384, 480, 448, 128, -704, -2304, -4864, -8320, -12032, -14336, -12032, 0, 28672, 81408, 162816, 268288, 373760, 421888, 307200, -133120, -1110016, -2834432, -5402624, -8585216, -11501568, -12197888
Offset: 0

Views

Author

Paul Barry, Oct 30 2006

Keywords

Comments

Diagonal sums of number array A124394.

Crossrefs

Cf. A077940.

Programs

  • GAP
    a:=[1,0,0];; for n in [3..50] do a[n]:=2*a[n-1]-2*a[n-3]; od; a; # G. C. Greubel, Dec 25 2019
  • Magma
    I:=[1,0,0]; [n le 3 select I[n] else 2*Self(n-1) - 2*Self(n-3): n in [1..50]]; // G. C. Greubel, Dec 25 2019
    
  • Maple
    a:= n-> (Matrix([[2, 1, 0], [0, 0, 1], [-2, 0, 0]])^n)[2, 2]: seq (a(n), n=0..35);  # Alois P. Heinz, Sep 10 2008
  • Mathematica
    CoefficientList[Series[(1-2x)/(1-2x+2x^3),{x,0,50}],x] (* or *) LinearRecurrence[{2,0,-2},{1,0,0},50] (* Harvey P. Dale, Dec 21 2013 *)
  • PARI
    my(x='x+O('x^50)); Vec((1-2*x)/(1-2*x+2*x^3)) \\ G. C. Greubel, Dec 25 2019
    
  • Sage
    def A124395_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-2*x)/(1-2*x+2*x^3) ).list()
    A124395_list(50) # G. C. Greubel, Dec 25 2019
    

Formula

a(n) = Sum_{k=0..floor(n/2)} Sum{j=0..k+1} C(k+1,j)*C(n-j+1,2k+1)*(-2)^j.
a(n) = term (2,2) in the 3 X 3 matrix [2,1,0; 0,0,1; -2,0,0]^n. - Alois P. Heinz, Sep 10 2008
a(n) = 2*a(n-1) - 2*a(n-3); a(0)=1, a(1)=0, a(2)=0. - Harvey P. Dale, Dec 21 2013
a(n) = A077940(n) - 2*A077940(n-1). - R. J. Mathar, Jan 25 2016

A073314 Binomial transform, alternating in sign, of Lucas generalized numbers S(n): S(n) = S(n-1) + S(n-2) + S(n-3), S(0)=3, S(1)=1, S(2)=3.

Original entry on oeis.org

3, 2, 4, 2, 0, -8, -20, -40, -64, -88, -96, -64, 48, 288, 704, 1312, 2048, 2688, 2752, 1408, -2560, -10624, -24064, -43008, -64768, -81408, -76800, -24064, 114688, 382976, 814080, 1398784, 2031616, 2435072, 2072576, 81920, -4706304, -13557760
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Jul 29 2002

Keywords

Comments

a(n) is also the trace of D^n, where D is the 3*3 matrix: first row (0,-1,0), second row (-1,1,-1), third row (-1,0,1).

References

  • Sloane, N. J. A. and Plouffe, S. The Encyclopedia of Integer Sequences. San Diego, CA: Academic Press, 1995.

Crossrefs

Cf. A001644.

Programs

  • Magma
    I:=[3,2,4]; [n le 3 select I[n] else 2*Self(n-1)-2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 05 2014
    
  • Mathematica
    h[n_]:= h[n]=2*h[n-1]-2*h[n-3]; h[0]=3; h[1]=2; h[2]=4; Table[h[n], {n, 0, 40}]
    CoefficientList[Series[(3-4x)/(1-2x+2x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 05 2014 *)
    LinearRecurrence[{2,0,-2},{3,2,4},40] (* Harvey P. Dale, May 16 2016 *)
  • PARI
    my(x='x+O('x^40)); Vec((3-4*x)/(1-2*x+2*x^3)) \\ G. C. Greubel, Apr 22 2019
    
  • Sage
    ((3-4*x)/(1-2*x+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019

Formula

a(n) = 2*a(n-1) - 2*a(n-3), a(0)=3, a(1)=2, a(2)=4.
G.f.: (3-4*x)/(1-2*x+2*x^3).
a(n) = 3*A077940(n) - 4*A077940(n-1). - R. J. Mathar, Feb 04 2014
Showing 1-3 of 3 results.