login
Irregular triangular array T read by rows: T(n,k) = C(n,k) for k=0..n for n = 0,1,2,3. For n >= 4, T(n,0) = T(n,2n)=1, T(n,1) = T(n,2n-1) = n - 3, T(4,2) = 4, T(4,3) = 3, T(4,4) = 6; T(4,5) = 3, T(4,6)=4; for n >= 5, T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) for k=2..2n-2.
21

%I #23 Dec 28 2015 16:47:50

%S 1,1,1,1,2,1,1,3,3,1,1,1,4,3,6,3,4,1,1,1,2,6,8,13,12,13,8,6,2,1,1,3,9,

%T 16,27,33,38,33,27,16,9,3,1,1,4,13,28,52,76,98,104,98,76,52,28,13,4,1,

%U 1,5,18,45,93,156,226,278,300,278,226,156,93,45,18,5,1,1,6,24,68,156,294,475,660,804

%N Irregular triangular array T read by rows: T(n,k) = C(n,k) for k=0..n for n = 0,1,2,3. For n >= 4, T(n,0) = T(n,2n)=1, T(n,1) = T(n,2n-1) = n - 3, T(4,2) = 4, T(4,3) = 3, T(4,4) = 6; T(4,5) = 3, T(4,6)=4; for n >= 5, T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) for k=2..2n-2.

%C For n >= 4, T(n,k) = number of strings s(0)..s(n) such that s(n) = n - k, s(0) = 0, |s(i)-s(i-1)| = 1 for i=1,2,3 and |s(i)-s(i-1)| <= 1 for i >= 4.

%H Clark Kimberling, <a href="/A026082/b026082.txt">Rows 0..100, flattened</a>

%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>

%F G.f.: (1-y*z)^3 / (1-z*(1+y+y^2)).

%e First 6 rows:

%e 1

%e 1 1

%e 1 2 1

%e 1 3 3 1

%e 1 1 4 3 6 3 4 1 1

%e 1 2 6 8 12 12 13 8 6 2 1

%p A026082 := proc(n,k)

%p option remember;

%p if n < 0 or k < 0 or k > 2*n then

%p 0 ;

%p elif n <= 3 then

%p binomial(n,k) ;

%p elif n = 4 then

%p op(k+1,[1,1,4,3,6,3,4,1,1]) ;

%p elif k =0 or k=2*n then

%p 1 ;

%p else

%p procname(n-1,k-2)+procname(n-1,k-1)+procname(n-1,k) ;

%p end if;

%p end proc: # _R. J. Mathar_, Jun 23 2013

%t z = 15; t[n_, 0] := 1 /; n >= 4; t[n_, 1] := n - 3 /; n >= 4;

%t t[4, 2] = 4; t[4, 3] = 3; t[4, 4] = 6; t[4, 5] = 3; t[4, 6] = 4;

%t t[n_, k_] := t[n, k] = Which[0 <= k <= n && 0 <= n <= 3, Binomial[n, k], n

%t >= 4 && k == 2 n, 1, k == 2 n - 1, n - 3, 2 <= k <= 2 n - 2, t[n - 1, k -

%t 2] + t[n - 1, k - 1] + t[n - 1, k]]; s = Table[Binomial[n, k], {n, 0, 3},

%t {k, 0, n}]; u = Join[s, Table[t[n, k], {n, 4, z}, {k, 0, 2 n}]];

%t TableForm[u] (* A026082 array *)

%t Flatten[u] (* A026082 sequence *)

%Y First differences of A024996.

%K nonn,tabf

%O 1,5

%A _Clark Kimberling_

%E Updated by _Clark Kimberling_, Aug 28 2014