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.

Showing 1-2 of 2 results.

A134346 Triangle read by rows: T(n,k) = (2^(n+1)-1)*binomial(n,k).

Original entry on oeis.org

1, 3, 3, 7, 14, 7, 15, 45, 45, 15, 31, 124, 186, 124, 31, 63, 315, 630, 630, 315, 63, 127, 762, 1905, 2540, 1905, 762, 127, 255, 1785, 5355, 8925, 8925, 5355, 1785, 255, 511, 4088, 14308, 28616, 35770, 28616, 14308, 4088, 511
Offset: 0

Views

Author

Gary W. Adamson, Oct 21 2007

Keywords

Comments

Inverse binomial transform: A134347.
From Wolfdieter Lang, Jul 27 2022: (Start)
Also the triangle t with offset 1 and elements t(n, m) = T(n-1, m-1) read by rows, giving in row n >= 1 the sums of the entries of A356028 of like m.
Also triangle t with offset 1 read by rows, giving in row n >= 1 the sum of the numbers from 1, 2, ..., 2^n - 1 with binary weight m, for m = 1, 2, ..., n. [Observation by Kevin Ryde.] (End)
T(n,k) is the sum of the entries in the (k+2)-th column of the Christmas tree pattern (A367562) of order n+1. - Paolo Xausa, Dec 20 2023

Examples

			First few rows of the triangle:
n\k    0    1     2     3      4      5     6     7    8   9 ...
0:     1
1:     3    3
2:     7   14     7
3:    15   45    45    15
4:    31  124   186   124     31
5:    63  315   630   630    315     63
6:   127  762  1905  2540   1905    762   127
7:   255 1785  5355  8925   8925   5355  1785   255
8:   511 4088 14308 28616  35770  28616 14308  4088  511
9:  1023 9207 36828 85932 128898 128898 85932 36828 9207 1023
... reformatted by _Wolfdieter Lang_, Aug 21 2022
----------------------------------------------------------------------------------
T(3, 1) = 12 + 10 + 9 + 6 + 5 + 3 = 45. (From A356028 row n = 4, m = 2.)
Recurrences: T(4, 1) = 45 + 15 + 4*16 = 2*(45 + 15) +4 = 124. - _Wolfdieter Lang_, Jul 27 2022
		

Crossrefs

Cf. A000225, A006516(n+1) (row sums), A124929, A134347, A356028, A356117.

Programs

  • Maple
    A134346 := proc(n,k)
        (2^(n+1)-1)*binomial(n,k) ;
    end proc:
    seq(seq( A134346(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Aug 15 2022
    ser := series((1/2 - x)^(k - n - 1) - (1 - x)^(k - n - 1), x, 10):
    seq(seq(coeff(ser, x, k), k = 0..n), n = 0..9); # Peter Luschny, Aug 22 2022
  • Mathematica
    A134346[n_,k_]:=(2^(n+1)-1)Binomial[n,k];
    Table[A134346[n,k],{n,0,10},{k,0,n}] (* Paolo Xausa, Dec 20 2023 *)
  • PARI
    T(n,k) = my(b=binomial(n,k)); b<<(n+1) - b; \\ Kevin Ryde, Aug 15 2022

Formula

T(n, m) = A000225(n+1)*A007318(n, m).
From Wolfdieter Lang, Aug 21 2022: (Start)
T(n, k) = 0 for n < k, T(n, 0) = 2^(n+1) - 1, and
T(n, k) = T(n-1, k) + T(n-1, k-1) + binomial(n, k)*2^n, or
T(n, k) = 2*(T(n-1, k) + T(n-1, k-1)) + binomial(n-1, k-1).
(Proof for T(n-1, m-1) = t(n, m), offset 1, by separating in the list of the binary code of the numbers 1, 2, ..., 2^n-1 of length n and weight m the sublists with first entry 1 and 0. The total number of elements of the list for n and m is binomial(n, m).) (End)
T(n, k) = [x^k] ((1/2 - x)^(k - n - 1) - (1 - x)^(k - n - 1)). - Peter Luschny, Aug 22 2022

Extensions

Name simplified by R. J. Mathar, Aug 15 2022

A359336 Irregular triangle read by rows: the n-th row lists the values 0..2^n-1 representing all subsets of a set of n elements. When its elements are linearly ordered, the subsets are sorted first by their size and then lexicographically.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 3, 0, 4, 2, 1, 6, 5, 3, 7, 0, 8, 4, 2, 1, 12, 10, 9, 6, 5, 3, 14, 13, 11, 7, 15, 0, 16, 8, 4, 2, 1, 24, 20, 18, 17, 12, 10, 9, 6, 5, 3, 28, 26, 25, 22, 21, 19, 14, 13, 11, 7, 30, 29, 27, 23, 15, 31, 0, 32, 16, 8, 4, 2, 1, 48, 40, 36, 34, 33, 24, 20, 18, 17, 12, 10, 9, 6, 5, 3, 56, 52, 50, 49
Offset: 0

Views

Author

Valentin Bakoev, Dec 27 2022

Keywords

Comments

The n-th row of the table is denoted by row(n) and contains a permutation of the integers from the interval [0, 2^n-1] which defines an ordering of all binary vectors of length n. Let the elements of the set B_n = {b_n, b_(n-1), ..., b_2, b_1} be linearly ordered: b_n < b_(n-1) < ... < b_2 < b_1. When we consider the binary vectors defined by row(n) as characteristic vectors, they define all subsets of B_n, sorted first by their cardinalities and then lexicographically. The sequence in row(n) is partitioned into n+1 subsequences of integers whose binary vectors have the same (Hamming) weight.
Equivalently, the sequence in row(n) defines all (n,k) combinations over a linearly ordered set in lexicographic order, for k = 0, 1, ..., n.
Like A294648 and A351939, A359336 represents one of the numerous weight orderings of the vectors of the n-dimensional Boolean cube (or the subsets of a set of n-elements sorted by their size) - see A051459.
Following the formula for row(n), we get:
T(n,0) = 0;
T(n, 2^n-1) = 2^n-1;
T(n,n) = 1, for n >= 1.
T(n,k) = 2^(n-k) for 1 <= k <= n.
Thus the regular triangle T(n,k), for n = 1, 2, 3, ... and for 1 <= k <= n consists of powers of 2 (A000079): in ascending order by columns and in descending order by rows.

Examples

			In the following table, the members of row(3) are given in column dec., the corresponding characteristic vectors are in column bin., and the corresponding subsets of B_3 are listed under B_3.
dec., bin., B_3 = {a, b, c}
---------------------------
 0    000        {}
 4    100        {a}
 2    010        {b}
 1    001        {c}
 6    110        {a, b}
 5    101        {a, c}
 3    011        {b, c}
 7    111        {a, b, c}
As seen, the corresponding subsets of equal size are ordered lexicographically.
Triangle T(n,k) begins:
    k = 0   1   2   3   4   5   6   7 ...
  n=0:  0;
  n=1:  0,  1;
  n=2:  0,  2,  1,  3;
  n=3:  0,  4,  2,  1,  6,  5,  3,  7;
  n=4:  0,  8,  4,  2,  1, 12, 10,  9,  6,  5,  3, 14, 13, 11,  7, 15,
  n=5:  0, 16,  8,  4,  2,  1, 24, 20, 18, 17, 12, 10,  9,  6,  5,  3, 28, 26, 25, 22, 21, 19, 14, 13, 11, 7, 30, 29, 27, 23, 15, 31;
  ...
		

Crossrefs

Cf. A000004 (column k=0), A000225 (right border), A000012 (main diagonal), A006516 (row sums).
Cf. A294648 (weight-lexicographic order of the binary vectors), A351939 (the values 0..2^n-1 sorted first by Hamming weight and then by position in reflected Gray code).
Cf. A356028.

Formula

For n = 1, 2, 3, ..., row(n) is a concatenation of the subsequences r(n, 0), r(n, 1), ..., r(n, n) defined by the recurrence:
r(n, 0) = (0),
r(n, n) = (2^n - 1),
r(n, k) = (r(n-1, k-1) + 2^(n-1)) concatenate r(n-1, k), for 0 < k < n.
In the above, r(n-1, k-1) + 2^(n-1) means the 2^(n-1) is added to each member of the subsequence r(n-1, k-1).
Showing 1-2 of 2 results.