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.

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

Original entry on oeis.org

1, -1, 3, -7, 15, -35, 79, -179, 407, -923, 2095, -4755, 10791, -24491, 55583, -126147, 286295, -649755, 1474639, -3346739, 7595527, -17238283, 39122815, -88790435, 201512631, -457339131, 1037945263, -2355648787, 5346217575, -12133405675, 27537138399, -62496384899, 141837473047
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,1,-3];; for n in [4..40] do a[n]:=-a[n-1]+2*a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Jun 24 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/(1+x-2*x^2+2*x^3) )); // G. C. Greubel, Jun 24 2019
    
  • Mathematica
    CoefficientList[Series[1/(1+x-2x^2+2x^3),{x,0,40}],x] (* or *) LinearRecurrence[ {-1,2,-2},{1,-1,3},40] (* Harvey P. Dale, Sep 29 2018 *)
  • PARI
    Vec(1/(1+x-2*x^2+2*x^3)+O(x^40)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    (1/(1+x-2*x^2+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 24 2019
    

Formula

a(n) = (-1)^n*A077946(n). - R. J. Mathar, Feb 28 2019

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

Original entry on oeis.org

1, 2, 5, 12, 27, 62, 141, 320, 727, 1650, 3745, 8500, 19291, 43782, 99365, 225512, 511807, 1161562, 2636201, 5982940, 13578467, 30816750, 69939565, 158730000, 360242631, 817581762, 1855527025, 4211175812, 9557393387, 21690799062, 49227937461, 111724322360
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077946 (first differences).
Cf. A078006 (second differences).

Programs

  • Mathematica
    CoefficientList[Series[(1-x)^(-1)/(1-x-2x^2-2x^3),{x,0,40}],x] (* or *) LinearRecurrence[{2,1,0,-2},{1,2,5,12},40] (* Harvey P. Dale, Sep 14 2016 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x)^(-1)/(1-x-2*x^2-2*x^3)) \\ Christian Krause, Jan 02 2023

Formula

a(n) = a(n-1) + 2*a(n-2) + 2*a(n-3) + 1. - Christian Krause, Jan 02 2023

A189187 Riordan matrix (1/(1-x-x^2-x^3),(x+x^2)/(1-x-x^2-x^3)).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 4, 7, 5, 1, 7, 17, 16, 7, 1, 13, 38, 46, 29, 9, 1, 24, 82, 122, 99, 46, 11, 1, 44, 174, 304, 303, 184, 67, 13, 1, 81, 362, 728, 857, 641, 309, 92, 15, 1, 149, 743, 1690, 2291, 2031, 1212, 482, 121, 17, 1, 274, 1509, 3827, 5869, 6004, 4260, 2108, 711, 154, 19, 1
Offset: 0

Views

Author

Emanuele Munarini, Apr 18 2011

Keywords

Comments

Row sums are A077936, diagonal sums are A077946

Examples

			Triangle begins:
1
1,1
2,3,1
4,7,5,1
7,17,16,7,1
13,38,46,29,9,1
24,82,122,99,46,11,1
44,174,304,303,184,67,13,1
81,362,728,857,641,309,92,15,1
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Sum[Binomial[i+k,k]Sum[Binomial[i+k,j]Binomial[n-i-j,i+k],{j,0,n-k-2i}],{i,0,n}],{n,0,20},{k,0,n}]]
  • Maxima
    create_list(sum(binomial(i+k,k)*sum(binomial(i+k,j)*binomial(n-i-j,i+k),j,0,n-k-2*i),i,0,n),n,0,8,k,0,n);

Formula

T(n,k) = [x^n](x+x^2)^k/(1-x-x^2-x^3)^(k+1).
T(n,k) = sum(binomial(i+k,k)*sum(binomial(i+k,j)*binomial(n-i-j,i+k),j=0..n-k-2*i),i=0..n).
T(n,k) = sum(binomial(k,i)*(-1)^(k-i)*sum(binomial(j+k,k)*trinomial(i+j,n-3*k+2*i-j),j=0..n-k),i=0..k)
Recurrence: T(n+3,k+1) = T(n+2,k+1) + T(n+2,k) + T(n+1,k+1) + T(n+1,k) + T(n,k+1)

Extensions

a(23) and a(40) corrected by Georg Fischer, Feb 20 2021 and Apr 29 2022
Showing 1-3 of 3 results.