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.

A158497 Triangle T(n,k) formed by the coordination sequences and the number of leaves for trees.

This page as a plain text file.
%I A158497 #12 Mar 19 2025 10:14:44
%S A158497 1,1,1,1,2,2,1,3,6,12,1,4,12,36,108,1,5,20,80,320,1280,1,6,30,150,750,
%T A158497 3750,18750,1,7,42,252,1512,9072,54432,326592,1,8,56,392,2744,19208,
%U A158497 134456,941192,6588344,1,9,72,576,4608,36864,294912,2359296,18874368,150994944,1,10,90,810,7290,65610,590490,5314410,47829690,430467210,3874204890
%N A158497 Triangle T(n,k) formed by the coordination sequences and the number of leaves for trees.
%C A158497 Consider the k-fold Cartesian products CP(n,k) of the vector A(n) = [1, 2, 3, ..., n].
%C A158497 An element of CP(n,k) is a n-tuple T_t of the form T_t = [i_1, i_2, i_3, ..., i_k] with t=1, .., n^k.
%C A158497 We count members T of CP(n,k) which satisfy some condition delta(T_t), so delta(.) is an indicator function which attains values of 1 or 0 depending on whether T_t is to be counted or not; the summation sum_{CP(n,k)} delta(T_t) over all elements T_t of CP produces the count.
%C A158497 For the triangle here we have delta(T_t) = 0 if for any two i_j, i_(j+1) in T_t one has i_j = i_(j+1): T(n,k) = Sum_{CP(n,k)} delta(T_t) = Sum_{CP(n,k)} delta(i_j = i_(j+1)).
%C A158497 The test on i_j > i_(j+1) generates A158498. One gets the Pascal triangle A007318 if the indicator function tests whether for any two i_j, i_(j+1) in T_t one has i_j >= i_(j+1).
%C A158497 Use of other indicator functions can also calculate the Bell numbers A000110, A000045 or A000108.
%H A158497 G. C. Greubel, <a href="/A158497/b158497.txt">Rows n = 0..50 of the triangle, flattened</a>
%F A158497 T(n, k) = (n-1)^(k-1) + (n-1)^k = n*A079901(n-1,k-1), k > 0.
%F A158497 Sum_{k=0..n} T(n,k) = (n*(n-1)^n - 2)/(n-2), n > 2.
%e A158497 Array, A(n, k) = n*(n-1)^(k-1) for n > 1, A(n, k) = 1 otherwise, begins as:
%e A158497   1,  1,   1,    1,     1,      1,       1,        1,        1, ... A000012;
%e A158497   1,  1,   1,    1,     1,      1,       1,        1,        1, ... A000012;
%e A158497   1,  2,   2,    2,     2,      2,       2,        2,        2, ... A040000;
%e A158497   1,  3,   6,   12,    24,     48,      96,      192,      384, ... A003945;
%e A158497   1,  4,  12,   36,   108,    324,     972,     2916,     8748, ... A003946;
%e A158497   1,  5,  20,   80,   320,   1280,    5120,    20480,    81920, ... A003947;
%e A158497   1,  6,  30,  150,   750,   3750,   18750,    93750,   468750, ... A003948;
%e A158497   1,  7,  42,  252,  1512,   9072,   54432,   326592,  1959552, ... A003949;
%e A158497   1,  8,  56,  392,  2744,  19208,  134456,   941192,  6588344, ... A003950;
%e A158497   1,  9,  72,  576,  4608,  36864,  294912,  2359296, 18874368, ... A003951;
%e A158497   1, 10,  90,  810,  7290,  65610,  590490,  5314410, 47829690, ... A003952;
%e A158497   1, 11, 110, 1100, 11000, 110000, 1100000, 11000000, ............. A003953;
%e A158497   1, 12, 132, 1452, 15972, 175692, 1932612, 21258732, ............. A003954;
%e A158497   1, 13, 156, 1872, 22464, 269568, 3234816, 38817792, ............. A170732;
%e A158497   ... ;
%e A158497 The triangle begins as:
%e A158497   1
%e A158497   1, 1;
%e A158497   1, 2,  2;
%e A158497   1, 3,  6,  12;
%e A158497   1, 4, 12,  36,  108;
%e A158497   1, 5, 20,  80,  320,  1280;
%e A158497   1, 6, 30, 150,  750,  3750,  18750;
%e A158497   1, 7, 42, 252, 1512,  9072,  54432, 326592;
%e A158497   1, 8, 56, 392, 2744, 19208, 134456, 941192, 6588344;
%e A158497   ...;
%e A158497 T(3,3) = 12 counts the triples (1,2,1), (1,2,3), (1,3,1), (1,3,2), (2,1,2), (2,1,3), (2,3,1), (2,3,2), (3,1,2), (3,1,3), (3,2,1), (3,2,3) out of a total of 3^3 = 27 triples in the CP(3,3).
%t A158497 A158497[n_, k_]:= If[n<2 || k==0, 1, n*(n-1)^(k-1)];
%t A158497 Table[A158497[n,k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Mar 18 2025 *)
%o A158497 (Magma)
%o A158497 A158497:= func< n,k | k le 1 select n^k else n*(n-1)^(k-1) >;
%o A158497 [A158497(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Mar 18 2025
%o A158497 (SageMath)
%o A158497 def A158497(n,k): return n^k if k<2 else n*(n-1)^(k-1)
%o A158497 print(flatten([[A158497(n,k) for k in range(n+1)] for n in range(13)])) # _G. C. Greubel_, Mar 18 2025
%Y A158497 Array rows n: A170733 (n=14), ..., A170769 (n=50).
%Y A158497 Columns k: A000012(n) (k=0), A000027(n) (k=1), A002378(n-1) (k=2), A011379(n-1) (k=3), A179824(n) (k=4), A101362(n-1) (k=5), 2*A168351(n-1) (k=6), 2*A168526(n-1) (k=7), 2*A168635(n-1) (k=8), 2*A168675(n-1) (k=9), 2*A170783(n-1) (k=10), 2*A170793(n-1) (k=11).
%Y A158497 Diagonals k: A055897 (k=n), A055541 (k=n-1), A373395 (k=n-2), A379612 (k=n-3).
%Y A158497 Sums: (-1)^n*A065440(n) (signed row).
%Y A158497 Cf. A000045, A000108, A000110, A007318, A079901, A158498.
%K A158497 nonn,tabl
%O A158497 0,5
%A A158497 _Thomas Wieder_, Mar 20 2009
%E A158497 Edited by _R. J. Mathar_, Mar 31 2009
%E A158497 More terms added by _G. C. Greubel_, Mar 18 2025