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.

A120925 Number of ternary words on {0,1,2} having no isolated 0's.

Original entry on oeis.org

1, 2, 5, 13, 33, 83, 209, 527, 1329, 3351, 8449, 21303, 53713, 135431, 341473, 860983, 2170865, 5473575, 13800961, 34797463, 87737617, 221219847, 557779233, 1406373239, 3546000945, 8940814823, 22543189057, 56839939415, 143315069777
Offset: 0

Views

Author

Emeric Deutsch, Jul 16 2006

Keywords

Comments

Column 0 of A120924.

Examples

			a(2)=5 because we have 00,11,12,21 and 22.
		

Crossrefs

Programs

  • Maple
    a[0]:=1:a[1]:=2:a[2]:=5: for n from 3 to 32 do a[n]:=3*a[n-1]-2*a[n-2]+2*a[n-3] od: seq(a[n],n=0..32);
  • Mathematica
    nn=20;a=x^2/(1-x);CoefficientList[Series[(a+1)/(1-(2x a)/(1-2x))/(1-2x),{x,0,nn}],x]  (* Geoffrey Critzer, Jan 13 2013 *)
    LinearRecurrence[{3,-2,2},{1,2,5},30] (* Harvey P. Dale, Nov 16 2024 *)

Formula

a(n) = 3a(n-1)-2a(n-2)+2a(n-3); a(0)=1, a(1)=2,a(2)=5.
G.f.: (1-z+z^2)/(1-3z+2z^2-2z^3).