%I #11 Dec 22 2014 02:01:22
%S 1,1,1,1,1,2,1,2,1,1,3,2,3,2,3,1,1,4,4,4,5,4,4,4,1,1,5,7,6,9,7,9,6,7,
%T 5,1,1,6,11,10,14,14,15,14,14,10,11,6,1,1,7,16,17,21,26,25,29,25,26,
%U 21,17,16,7,1,1,8,22,28,32,44,44,52,49,52,44,44,32,28,22,8,1,1,9,29,44,50
%N A generalized Pascal triangle of order 3: T(n,m), n >= 0, 2*n >= m >= 0.
%D B. A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8. English translation published by Fibonacci Association, Santa Clara Univ., Santa Clara, CA, 1993; see p. 44.
%F T(n, m) = T(n-1, m-2) + T(n-1, m-1) + T(n-1, m) - 2*T(n-2, m-2). In words, each entry is the sum of 3 entries above it (i.e., in the previous row) minus twice the entry two rows above it.
%e Triangle begins
%e . . . 1
%e . . 1 1 1
%e . 1 2 1 2 1
%e 1 3 2 3 2 3 1
%p T := proc(n, m) option remember: if m=0 then RETURN(1) fi: if m=2*n then RETURN(1) fi: if n=1 and m=1 then RETURN(1) fi: if n=2 and m mod 2 = 0 and m >= 0 and m<=2*n then RETURN(1) fi: if n=2 and m mod 2 = 1 and m >= 0 and m<=2*n then RETURN(2) fi: if m>2*n then RETURN(0) fi: if m<0 then RETURN(0) fi: T(n-1,m-2)+T(n-1,m-1)+T(n-1,m)-2*T(n-2,m-2): end:for n from 0 to 10 do for m from 0 to 2*n do printf(`%d,`,T(n,m)) od: od: # _James A. Sellers_, Feb 24 2001
%K nonn,easy,tabf
%O 0,6
%A _N. J. A. Sloane_, Feb 22 2001
%E More terms from _James A. Sellers_, Feb 24 2001
|