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.

A119369 Pendular trinomial triangle, read by rows of 2n+1 terms (n>=0), defined by the recurrence: if 0 < k < n, T(n,k) = T(n-1,k) + T(n,2n-1-k); otherwise, if n-1 < k < 2n-1, T(n,k) = T(n-1,k) + T(n,2n-2-k); with T(n,0)=T(n+1,2n)=1 and T(n+1,2n+1)=T(n+1,2n+2)=0.

This page as a plain text file.
%I A119369 #13 Mar 17 2021 08:02:33
%S A119369 1,1,0,0,1,1,1,0,0,1,2,3,2,1,0,0,1,3,6,9,7,3,1,0,0,1,4,10,20,30,23,11,
%T A119369 4,1,0,0,1,5,15,36,70,104,81,40,16,5,1,0,0,1,6,21,58,133,253,374,293,
%U A119369 149,63,22,6,1,0,0,1,7,28,87,226,501,938,1380,1087,564,248,93,29,7,1,0,0
%N A119369 Pendular trinomial triangle, read by rows of 2n+1 terms (n>=0), defined by the recurrence: if 0 < k < n, T(n,k) = T(n-1,k) + T(n,2n-1-k); otherwise, if n-1 < k < 2n-1, T(n,k) = T(n-1,k) + T(n,2n-2-k); with T(n,0)=T(n+1,2n)=1 and T(n+1,2n+1)=T(n+1,2n+2)=0.
%C A119369 The diagonals may be generated by iterated convolutions of a base sequence B with the sequence C of central terms. The g.f. B(x) of the base sequence satisfies: B = 1 + x*B^2 + x^2*(B^2 - B); the g.f. C(x) of the central terms satisfies: C(x) = 1/(1+x - x*B(x)).
%H A119369 G. C. Greubel, <a href="/A119369/b119369.txt">Rows n = 0..50 of the triangle, flattened</a>
%F A119369 Sum_{k=0..2*n} T(n, k) = A119372(n). - _G. C. Greubel_, Mar 16 2021
%e A119369 To obtain row 4, pendular sums of row 3 are carried out as follows.
%e A119369   [1, 2, 3, 2, 1, 0, 0]: given row 3;
%e A119369   [1, _, _, _, _, _, _]: start with T(4,0) = T(3,0) = 1;
%e A119369   [1, _, _, _, _, _, 1]: T(4,6) = T(4,0) + T(3,6) = 1 + 0 = 1;
%e A119369   [1, 3, _, _, _, _, 1]: T(4,1) = T(4,6) + T(3,1) = 1 + 2 = 3;
%e A119369   [1, 3, _, _, _, 3, 1]: T(4,5) = T(4,1) + T(3,5) = 3 + 0 = 3;
%e A119369   [1, 3, 6, _, _, 3, 1]: T(4,2) = T(4,5) + T(3,2) = 3 + 3 = 6;
%e A119369   [1, 3, 6, _, 7, 3, 1]: T(4,4) = T(4,2) + T(3,4) = 6 + 1 = 7;
%e A119369   [1, 3, 6, 9, 7, 3, 1]: T(4,3) = T(4,4) + T(3,3) = 7 + 2 = 9;
%e A119369   [1, 3, 6, 9, 7, 3, 1, 0, 0]: complete row 4 by appending two zeros.
%e A119369 Triangle begins:
%e A119369   1;
%e A119369   1, 0,  0;
%e A119369   1, 1,  1,  0,   0;
%e A119369   1, 2,  3,  2,   1,   0,   0;
%e A119369   1, 3,  6,  9,   7,   3,   1,    0,    0;
%e A119369   1, 4, 10, 20,  30,  23,  11,    4,    1,   0,   0;
%e A119369   1, 5, 15, 36,  70, 104,  81,   40,   16,   5,   1,  0,  0;
%e A119369   1, 6, 21, 58, 133, 253, 374,  293,  149,  63,  22,  6,  1, 0, 0;
%e A119369   1, 7, 28, 87, 226, 501, 938, 1380, 1087, 564, 248, 93, 29, 7, 1, 0, 0;
%e A119369 Central terms are:
%e A119369   C = A119371 = [1, 0, 1, 2, 7, 23, 81, 293, 1087, 4110, ...].
%e A119369 Lower diagonals start:
%e A119369   D1 = A119372 = [1, 1, 3, 9, 30, 104, 374, 1380, 5197, ...];
%e A119369   D2 = A119373 = [1, 2, 6, 20, 70, 253, 938, 3546, 13617, ...].
%e A119369   Diagonals above central terms (ignoring leading zeros) start:
%e A119369   U1 = A119375 = [1, 3, 11, 40, 149, 564, 2166, 8420, ...];
%e A119369   U2 = A119376 = [1, 4, 16, 63, 248, 980, 3894, 15563, ...].
%e A119369 There exists the base sequence:
%e A119369   B = A119370 = [1, 1, 2, 6, 19, 64, 225, 816, 3031, 11473, ...]
%e A119369 which generates all diagonals by convolutions with central terms:
%e A119369   D2 = B * D1 = B^2 * C
%e A119369   U2 = B * U1 = B^2 * C"
%e A119369 where C" = [1, 2, 7, 23, 81, 293, 1087, ...]
%e A119369 are central terms not including the initial [1,0].
%p A119369 T:= proc(n, k) option remember;
%p A119369       if k=0 and n=0 then 1
%p A119369     elif k<0 or k>2*(n-1) then 0
%p A119369     elif n=2 and k<3 then 1
%p A119369     else T(n-1, k) + `if`(k<n, T(n, 2*n-k-1), T(n, 2*n-k-2))
%p A119369       fi
%p A119369     end:
%p A119369 seq(seq(T(n, k), k=0..n), n=0..12); # _G. C. Greubel_, Mar 16 2021
%t A119369 T[n_, k_]:= T[n, k]= If[n==0 && k==0, 1, If[k<0 || k>2*(n-1), 0, If[n==2 && k<3, 1, T[n-1, k] +If[k<n, T[n, 2*n-k-1], T[n, 2*n-k-2] ]]]];
%t A119369 Table[T[n,k], {n,0,10}, {k,0,2*n}]//Flatten (* _G. C. Greubel_, Mar 16 2021 *)
%o A119369 (PARI) T(n,k)= if(k==0 && n==0, 1, if(k>2*n-2 || k<0, 0, if(n==2 && k<=2, 1, T(n-1,k) + if(k<n, T(n,2*n-1-k), T(n,2*n-2-k) ))));
%o A119369 (Sage)
%o A119369 @CachedFunction
%o A119369 def T(n, k):
%o A119369     if (n==0 and k==0): return 1
%o A119369     elif (k<0 or k>2*(n-1)): return 0
%o A119369     elif (n==2 and k<3): return 1
%o A119369     else: return T(n-1, k) + ( T(n, 2*n-k-1) if k<n else T(n, 2*n-k-2) )
%o A119369 flatten([[T(n, k) for k in (0..2*n)] for n in (0..12)]) # _G. C. Greubel_, Mar 16 2021
%Y A119369 Cf. A119370, A119371, A119372, A119373, A119374, A119375, A119376.
%Y A119369 Variants: A118340, A118345, A118350.
%K A119369 nonn,tabf
%O A119369 0,11
%A A119369 _Paul D. Hanna_, May 16 2006