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.

A120910 Triangle read by rows: T(n,k) is the number of ternary words of length n having k levels (n >= 1, 0 <= k <= n-1). A level is a pair of identical consecutive letters.

This page as a plain text file.
%I A120910 #16 Dec 29 2023 12:05:16
%S A120910 3,6,3,12,12,3,24,36,18,3,48,96,72,24,3,96,240,240,120,30,3,192,576,
%T A120910 720,480,180,36,3,384,1344,2016,1680,840,252,42,3,768,3072,5376,5376,
%U A120910 3360,1344,336,48,3,1536,6912,13824,16128,12096,6048,2016,432,54,3,3072
%N A120910 Triangle read by rows: T(n,k) is the number of ternary words of length n having k levels (n >= 1, 0 <= k <= n-1). A level is a pair of identical consecutive letters.
%C A120910 Row sums are the powers of 3 (A000244).
%C A120910 T(n,k) = 3*A038207(n-1,k).
%C A120910 T(n,k) = A120909(n,n-k).
%C A120910 Sum_{k>=0} k*T(n,k) = (n-1)*3^(n-1) = A036290(n-1).
%F A120910 T(n,k) = 3*2^(n-k-1)*binomial(n-1,k).
%F A120910 G.f.: (1 - (y - 1)*x)/(1 - (y + 2)*x). Generally for the number of length n words with k levels on an m-ary alphabet (m>1): (1 - (y - 1)*x)/(1 - (y + m - 1)*x).  - _Geoffrey Critzer_, May 19 2014
%e A120910 T(3,1)=12 because we have 001,002,011,022,100,110,112,122,200,211,220 and 221.
%e A120910 Triangle starts:
%e A120910    3;
%e A120910    6,  3
%e A120910   12, 12,  3;
%e A120910   24, 36, 18,  3;
%e A120910   48, 96, 72, 24,  3;
%p A120910 T:=(n,k)->3*2^(n-k-1)*binomial(n-1,k): for n from 1 to 11 do seq(T(n,k),k=0..n-1) od; # yields sequence in triangular form
%t A120910 sol=Solve[{a==v(z^2+a z),b==v(z^2+b z),c==v(z^2+c z)},{a,b,c}];f[z_,u_]:=1/(1-3z-a-b-c)/.sol/.v->u-1;nn=10;Drop[Map[Select[#,#>0&]&,Level[CoefficientList[Series[f[z,u],{z,0,nn}],{z,u}],{2}]],1]//Grid (* _Geoffrey Critzer_, May 19 2014 *)
%Y A120910 Cf. A000244, A038207, A120909, A036290.
%K A120910 nonn,tabl
%O A120910 1,1
%A A120910 _Emeric Deutsch_, Jul 15 2006