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 A120924 #7 Nov 26 2019 04:40:20 %S A120924 1,2,1,5,4,13,12,2,33,36,12,83,108,48,4,209,316,172,32,527,904,588, %T A120924 160,8,1329,2548,1932,672,80,3351,7104,6140,2592,480,16,8449,19628, %U A120924 19020,9440,2320,192,21303,53816,57756,32896,10000,1344,32,53713,146596 %N A120924 Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2}, having k isolated 0's (n >= 0, k >= 0). %C A120924 Row n has 1+ceiling(n/2) terms. %C A120924 Row sums are the powers of 3 (A000244). %C A120924 T(n,0) = A120925(n). %C A120924 Sum_{k=0..ceiling(n/2)} k*T(n,k) = A120926(n). %F A120924 G.f. = G(t,z) = (1-(1-t)z(1-z))/(1 - 3z + 2(1-t)z^2*(1-z)). %e A120924 T(2,0)=5 because we have 00,11,12,21 and 22; T(2,1)=4 because we have 01,02,10 and 20; T(3,2)=2 because we have 010 and 020. %e A120924 Triangle starts: %e A120924 1; %e A120924 2, 1; %e A120924 5, 4; %e A120924 13, 12, 2; %e A120924 33, 36, 12; %e A120924 83, 108, 48, 4; %p A120924 G:=(1-(1-t)*z*(1-z))/(1-3*z+2*(1-t)*z^2*(1-z)): Gser:=simplify(series(G,z=0,15)): P[0]:=1: for n from 1 to 13 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 13 do seq(coeff(P[n],t,j),j=0..ceil(n/2)) od; # yields sequence in triangular form %Y A120924 Cf. A000244, A105114, A120925, A120926. %K A120924 nonn,tabf %O A120924 0,2 %A A120924 _Emeric Deutsch_, Jul 16 2006