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.
%I A118357 #13 Nov 19 2012 05:59:43 %S A118357 1,3,8,1,22,4,1,60,16,4,1,164,56,18,4,1,448,188,68,20,4,1,1224,608, %T A118357 248,80,22,4,1,3344,1920,864,312,92,24,4,1,9136,5952,2928,1152,380, %U A118357 104,26,4,1,24960,18192,9696,4128,1472,452,116,28,4,1,68192,54976,31536,14400 %N A118357 Triangle read by rows: T(n,k) is the number of ternary sequences of length n containing k subsequences 00 (n>=0, 0<=k<=max(0,n-1)). %C A118357 Sum of entries in row n is 3^n (A000244). T(n,0) = A028859(n). T(n,1) = A073388(n-2). Sum(k*T(n,k),k=0..n-1) = (n-1)*3^(n-2) (A027471). %H A118357 Alois P. Heinz, <a href="/A118357/b118357.txt">n = 0..141, flattened</a> %F A118357 G.f.: G-1, where G = G(t,z) = [1+(1-t)z]/[1-(2+t)z-2(1-t)z^2]. G.f. of column k is z^(k+1)*(1-2z)^(k-1)/(1-2z-2z^2)^(k+1) (k>=1). %e A118357 T(4,2) = 4 because we have 0001, 0002, 1000 and 2000. %e A118357 Triangle starts: %e A118357 1; %e A118357 3; %e A118357 8,1; %e A118357 22,4,1; %e A118357 60,16,4,1; %p A118357 G:=(1+(1-t)*z)/(1-(2+t)*z-2*(1-t)*z^2): Gser:=simplify(series(G,z=0,15)): P[0]:=1: for n from 1 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: 1; for n from 1 to 12 do seq(coeff(P[n],t,j),j=0..n-1) od; # yields sequence in triangular form %t A118357 nn=15;a=1/(1-2x);b=x/(1-y x)+1;f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[a b/(1-2x^2/((1-y x)(1-2x))),{x,0,nn}],{x,y}]]//Grid (* _Geoffrey Critzer_, Nov 19 2012 *) %Y A118357 Cf. A000244, A028859, A073388, A027471. %K A118357 nonn,tabf %O A118357 0,2 %A A118357 _Emeric Deutsch_, May 24 2006