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 A120906 #7 May 19 2014 18:06:50 %S A120906 1,3,6,3,10,16,1,15,51,15,21,126,90,6,28,266,357,77,1,36,504,1107,504, %T A120906 36,45,882,2907,2304,414,9,55,1452,6765,8350,2850,210,1,66,2277,14355, %U A120906 25653,14355,2277,66,78,3432,28314,69576,58278,16236,1221,12,91,5005 %N A120906 Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2} having k drops (n>=0, k>=0). The drops of a ternary word on {0,1,2} are the subwords 10,20 and 21. %C A120906 Row n has 1+floor(2n/3) terms. Row sums are the powers of 3 (A000244). T(n,0)=A000217(n+1) (the triangular numbers). Sum(k*T(n,k),k>=0)=(n-1)*3^(n-1)=A036290(n-1). %H A120906 Alois P. Heinz, <a href="/A120906/b120906.txt">Rows n = 0..200, flattened</a> %F A120906 G.f.: G(t,z) = 1/[(1-z)^3-3tz^2+2tz^3-t^2*z^3]. %e A120906 T(5,3) = 6 because we have 1/02/1/0, 2/02/1/0, 2/1/01/0, 2/1/02/0, 2/12/1/0 and 2/1/02/1, the middle points of the drops being indicated by /. %e A120906 Triangle starts: %e A120906 1; %e A120906 3; %e A120906 6, 3; %e A120906 10, 16, 1; %e A120906 15, 51, 15; %e A120906 21, 126, 90, 6; %p A120906 G:=1/((1-z)^3-3*t*z^2+2*t*z^3-t^2*z^3): 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: for n from 0 to 12 do seq(coeff(P[n],t,j),j=0..floor(2*n/3)) od; # yields sequence in triangular form %p A120906 # second Maple program: %p A120906 b:= proc(n, i) option remember; `if`(n=0, 1, expand( %p A120906 add(b(n-1, j)*`if`(j<i, x, 1), j=0..2))) %p A120906 end: %p A120906 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): %p A120906 seq(T(n), n=0..15); # _Alois P. Heinz_, May 19 2014 %t A120906 sol=Solve[{a==v z^2,b==v z^2,c==v(z^2+a z)},{a,b,c}];f[z_,u_]:=1/(1-3z-a-b-c)/.sol/.v->u-1;nn=10;Map[Select[#,#>0&]&,Level[CoefficientList[Series[f[z,u],{z,0,nn}],{z,u}],{2}]]//Grid (* _Geoffrey Critzer_, May 19 2014 *) %Y A120906 Cf. A000244, A000217, A036290. %K A120906 nonn,tabf %O A120906 0,2 %A A120906 _Emeric Deutsch_, Jul 15 2006