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.

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

Original entry on oeis.org

1, 1, 4, 11, 31, 88, 249, 705, 1996, 5651, 15999, 45296, 128241, 363073, 1027924, 2910235, 8239391, 23327176, 66043369, 186980481, 529374876, 1498754083, 4243238399, 12013359840, 34011950561, 96293859201, 272624979364, 771849627691, 2185243073311, 6186810381368
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Equals INVERT transform of (1, 3, 4, 4, 4, ...). - Gary W. Adamson, Jan 03 2009

Programs

  • GAP
    a:=[1,1,4];; for n in [4..30] do a[n]:=2*a[n-1]+2*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jun 27 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/( 1-2*x-2*x^2-x^3) )); // G. C. Greubel, Jun 27 2019
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-2x-2x^2-x^3),{x,0,30}],x] (* or *) LinearRecurrence[{2,2,1},{1,1,4},30] (* Harvey P. Dale, Sep 11 2013 *)
  • Maxima
    a(n):=sum(sum(binomial(m+i-1,m-1)*sum(binomial(j,n-3*m+2*j-i) *binomial(m,j) *2^(n-3*m+2*j-i),j,0,m) ,i,0,n-m) ,m,1,n); /* Vladimir Kruchinin, May 12 2011 */
    
  • PARI
    Vec((1-x)/(1-2*x-2*x^2-x^3)+O(x^30)) \\ Charles R Greathouse IV, Sep 24 2012
    
  • Sage
    ((1-x)/(1-2*x-2*x^2-x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
    

Formula

a(n) = Sum_{m=1..n} Sum_{i=0..n-m} C(m+i-1,m-1)*Sum_{j=0..m} C(j,n-3*m +2*j-i) * C(m,j)*2^(n-3*m+2*j-i), n>0, a(0)=1. - Vladimir Kruchinin, May 12 2011
G.f.: 1 + x/(G(0)-x) where G(k) = 1 - x*(2*k+2)/(1 - 1/(1 + (2*k+2)/G(k+1)));(continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 17 2012
a(n) = 2*a(n-1) + 2*a(n-2) + a(n-3); a(0)=1, a(1)=1, a(2)=4. - Harvey P. Dale, Sep 11 2013