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

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

Original entry on oeis.org

1, -3, 8, -23, 65, -184, 521, -1475, 4176, -11823, 33473, -94768, 268305, -759619, 2150616, -6088775, 17238401, -48804968, 138175513, -391199363, 1107554720, -3135683679, 8877676161, -25134274400, 71159584801, -201465394563, 570384233128, -1614858840183, 4571951541185
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

|a(n)| equals the number of n-length ternary words avoiding runs of zeros of lengths 3i+2, (i=0,1,2,...). - Milan Janjic, Feb 26 2015

Crossrefs

Cf. A077983 (partial sums).

Programs

  • Mathematica
    a[n_] := a[n] = -2 a[n - 1] + 2 a[n - 2] - a[n - 3]; a[0] = 1; a[1] = -3; a[2] = 8; Table[Simplify[a[n]], {n, 0, 20}] (* Rigoberto Florez, Mar 22 2020 *)
  • Maxima
    a(n):=sum(sum((sum(binomial(j,-3*m+k+2*j)*2^(-3*m+k+2*j)*(-1)^(j-m)*(-3)^(3*m-k-j)*binomial(m,j),j,0,m))*binomial(n+m-k-1,m-1),k,m,n),m,1,n); /* Vladimir Kruchinin, May 06 2011 */

Formula

a(n) = -2*a(n-1)+2*a(n-2)-a(n-3), a(0)=1, a(1)=-3, a(2)=8.
a(n) = sum(m=1..n, sum(k=m..n, (sum(j=0..m, binomial(j,-3*m+k+2*j) *2^(-3*m+k+2*j)*(-1)^(j-m)*(-3)^(3*m-k-j)*binomial(m,j))) *binomial(n+m-k-1,m-1))), n>0, a(0)=1. - Vladimir Kruchinin, May 06 2011
Showing 1-1 of 1 results.