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.

A097710 Lower triangular matrix T, read by rows, such that row (n) is formed from the sums of adjacent terms in row (n-1) of the matrix square T^2, with T(0,0)=1.

This page as a plain text file.
%I A097710 #23 Feb 22 2024 09:09:05
%S A097710 1,1,1,2,3,1,7,13,7,1,41,88,61,15,1,397,951,781,257,31,1,6377,16691,
%T A097710 15566,6231,1041,63,1,171886,484490,500057,231721,48303,4161,127,1,
%U A097710 7892642,23701698,26604323,13843968,3406505,374127,16577,255,1
%N A097710 Lower triangular matrix T, read by rows, such that row (n) is formed from the sums of adjacent terms in row (n-1) of the matrix square T^2, with T(0,0)=1.
%C A097710 Column 0 is equal to sequence A008934, which is the number of tournament sequences.
%C A097710 This triangle has the same row sums and first column terms as in rows 2^n, for n>=0, of triangle A093654.
%H A097710 Paul D. Hanna, <a href="/A097710/b097710.txt">Table of n, a(n) for n = 0..495, of rows 0..30 of triangle in flattened form.</a>
%F A097710 T(n, k) = T^2(n-1, k-1) + T^2(n-1, k) for n>=1 and k>1, with T(n, 1) = T^2(n-1, 1) and T(n,n) = 1 for n>=0, where T^2 is the matrix square of this triangle T.
%F A097710 T(n, k) = Sum_{j=0..n-1} T(n-1, j)*(T(j, k-1) + T(j,k)), with T(n, 0) = Sum_{j=0..n-1} T(n-1,j)*T(j,0), and T(n, n) = 1.
%F A097710 T(n, 0) = A008934(n).
%F A097710 T(n, 1) = A097711(n).
%F A097710 Sum_{k=0..n} T(n, k) = A093657(n+1) (row sums).
%F A097710 From _G. C. Greubel_, Feb 21 2024: (Start)
%F A097710 T(n, n-1) = A000225(n).
%F A097710 Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n). (End)
%e A097710 Rows of this triangle T begin:
%e A097710        1;
%e A097710        1,      1;
%e A097710        2,      3,      1;
%e A097710        7,     13,      7,      1;
%e A097710       41,     88,     61,     15,     1;
%e A097710      397,    951,    781,    257,    31,    1;
%e A097710     6377,  16691,  15566,   6231,  1041,   63,   1;
%e A097710   171886, 484490, 500057, 231721, 48303, 4161, 127, 1;
%e A097710 Rows of T^2 begin:
%e A097710         1;
%e A097710         2,        1;
%e A097710         7,        6,        1;
%e A097710        41,       47,       14,       1;
%e A097710       397,      554,      227,      30,      1;
%e A097710      6377,    10314,     5252,     979,     62,     1;
%e A097710    171886,   312604,   187453,   44268,   4035,   126,   1;
%e A097710   7892642, 15809056, 10795267, 3048701, 357804, 16323, 254, 1;
%e A097710 The sums of adjacent terms in row (n) of T^2 forms row (n+1) of T:
%e A097710   T(5,0) = T^2(4,0) = 397;
%e A097710   T(5,1) = T^2(4,0) + T^2(4,1) = 397 + 554 = 951;
%e A097710   T(5,2) = T^2(4,1) + T^2(4,2) = 554 + 227 = 781.
%e A097710 Rows of matrix inverse T^(-1) begins:
%e A097710    1;
%e A097710   -1,     1;
%e A097710    1,    -3,      1;
%e A097710   -1,     8,     -7,     1;
%e A097710    1,   -25,     44,   -15,      1;
%e A097710   -1,   111,   -346,   208,    -31,    1;
%e A097710    1,  -809,   4045, -3720,    912,  -63,    1;
%e A097710   -1, 10360, -77351, 99776, -35136, 3840, -127, 1; ...
%e A097710 which is a signed version of A097712.
%t A097710 T[n_, k_] := T[n, k] = Which[n<0 || k>n, 0, n == k, 1, k == 0, Sum[T[n-1, j]*T[j, 0], {j, 0, n-1}], True, Sum[T[n-1, j]*T[j, k-1], {j, 0, n-1}] + Sum[T[n-1, j]*T[j, k], {j, 0, n-1}]]; Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 23 2016, adapted from PARI *)
%o A097710 (PARI) /* Using Recurrence relation: */
%o A097710 {T(n,k) = if(n<0||k>n, 0, if(n==k,1, if(k==0, sum(j=0,n-1, T(n-1,j)*T(j,0)),  sum(j=0,n-1, T(n-1,j)*T(j,k-1)) + sum(j=0,n-1, T(n-1,j)*T(j,k));)))}
%o A097710 for(n=0,8, for(k=0,n, print1(T(n,k),", "));print(""))
%o A097710 (PARI) /* Faster: using Matrix generating method: */
%o A097710 {T(n,k) = my(M=matrix(2,2,r,c,if(r>=c,1))); for(i=1,n,
%o A097710 N=matrix(#M+1,#M+1,r,c, if(r>=c, if(r<=#M,M[r,c], if(c>1,(M^2)[r-1,c-1]) + if(c<=#M,(M^2)[r-1,c])) ));
%o A097710 M=N;); M[n+1,k+1]}
%o A097710 for(n=0,10,for(k=0,n,print1(T(n,k),", "));print("")) \\ _Paul D. Hanna_, Nov 27 2016
%o A097710 (SageMath)
%o A097710 @CachedFunction
%o A097710 def T(n, k): # T = A097710
%o A097710     if n< 0 or k<0 or k>n: return 0
%o A097710     elif k==n: return 1
%o A097710     elif k==0: return sum(T(n-1,j)*T(j,0) for j in range(n))
%o A097710     else: return sum(T(n-1, j)*(T(j, k-1)+T(j,k)) for j in range(n))
%o A097710 flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Feb 21 2024
%Y A097710 Cf. A000007, A000225, A093654, A097712.
%Y A097710 Cf. A008934 (column k=0), A093657 (row sums), A097711 (column k=1).
%K A097710 nonn,tabl
%O A097710 0,4
%A A097710 _Paul D. Hanna_, Aug 22 2004