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.

A228273 T(n,k) is the number of s in {1,...,n}^n having longest ending contiguous subsequence with the same value of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

This page as a plain text file.
%I A228273 #30 Oct 07 2018 18:34:25
%S A228273 1,0,1,0,2,2,0,18,6,3,0,192,48,12,4,0,2500,500,100,20,5,0,38880,6480,
%T A228273 1080,180,30,6,0,705894,100842,14406,2058,294,42,7,0,14680064,1835008,
%U A228273 229376,28672,3584,448,56,8,0,344373768,38263752,4251528,472392,52488,5832,648,72,9
%N A228273 T(n,k) is the number of s in {1,...,n}^n having longest ending contiguous subsequence with the same value of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%H A228273 Alois P. Heinz, <a href="/A228273/b228273.txt">Rows n = 0..140, flattened</a>
%F A228273 T(0,0) = 1, else T(n,k) = 0 for k<1 or k>n, else T(n,n) = n, else T(n,k) = (n-1)*n^(n-k).
%F A228273 Sum_{k=0..n}   T(n,k) = A000312(n).
%F A228273 Sum_{k=0..n} k*T(n,k) = A031972(n).
%e A228273 T(0,0) = 1: [].
%e A228273 T(1,1) = 1: [1].
%e A228273 T(2,1) = 2: [1,2], [2,1].
%e A228273 T(2,2) = 2: [1,1], [2,2].
%e A228273 T(3,1) = 18: [1,1,2], [1,1,3], [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,2,1], [2,2,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3], [3,3,1], [3,3,2].
%e A228273 T(3,2) = 6: [1,2,2], [1,3,3], [2,1,1], [2,3,3], [3,1,1], [3,2,2].
%e A228273 T(3,3) = 3: [1,1,1], [2,2,2], [3,3,3].
%e A228273 Triangle T(n,k) begins:
%e A228273   1;
%e A228273   0,        1;
%e A228273   0,        2,       2;
%e A228273   0,       18,       6,      3;
%e A228273   0,      192,      48,     12,     4;
%e A228273   0,     2500,     500,    100,    20,    5;
%e A228273   0,    38880,    6480,   1080,   180,   30,   6;
%e A228273   0,   705894,  100842,  14406,  2058,  294,  42,  7;
%e A228273   0, 14680064, 1835008, 229376, 28672, 3584, 448, 56,  8;
%p A228273 T:= (n, k)-> `if`(n=0 and k=0, 1, `if`(k<1 or k>n, 0,
%p A228273              `if`(k=n, n, (n-1)*n^(n-k)))):
%p A228273 seq(seq(T(n,k), k=0..n), n=0..12);
%t A228273 f[0,0]=1;
%t A228273 f[n_,k_]:=Which[1<=k<=n-1,n^(n-k)*(n-1),k<1,0,k==n,n,k>n,0];
%t A228273 Table[Table[f[n,k],{k,0,n}],{n,0,10}]//Grid (* _Geoffrey Critzer_, May 19 2014 *)
%Y A228273 Row sums give: A000312.
%Y A228273 Columns k=0-4 give: A000007, A066274(n) = 2*A081131(n) for n>1, A053506(n) for n>2, A055865(n-1) = A085389(n-1) for n>3, A085390(n-1) for n>4.
%Y A228273 Main diagonal gives: A028310.
%Y A228273 Lower diagonals include (offsets may differ): A002378, A045991, A085537, A085538, A085539.
%Y A228273 Cf. A228154, A228617.
%K A228273 nonn,tabl,easy
%O A228273 0,5
%A A228273 _Alois P. Heinz_, Aug 19 2013