Original entry on oeis.org
1, 7, 21, 70, 245, 882, 3234, 12012, 45045, 170170, 646646, 2469012, 9464546, 36402100, 140408100, 542911320, 2103781365, 8167621770, 31762973550, 123708423300, 482462850870, 1883902560540, 7364346373020, 28817007546600, 112866612890850, 442437122532132, 1735714865318364
Offset: 0
-
a[n_]:=(7*Binomial[2n,n]-5*KroneckerDelta[n,0])/2; Array[a,27,0] (* Stefano Spezia, Feb 14 2025 *)
A047274
Numbers that are congruent to {0, 1} mod 7.
Original entry on oeis.org
0, 1, 7, 8, 14, 15, 21, 22, 28, 29, 35, 36, 42, 43, 49, 50, 56, 57, 63, 64, 70, 71, 77, 78, 84, 85, 91, 92, 98, 99, 105, 106, 112, 113, 119, 120, 126, 127, 133, 134, 140, 141, 147, 148, 154, 155, 161, 162, 168, 169
Offset: 1
Original entry on oeis.org
1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0
A356120
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 lexicographically ordered.
Original entry on oeis.org
0, 0, 1, 0, 2, 3, 1, 0, 4, 6, 7, 5, 2, 3, 1, 0, 8, 12, 14, 15, 13, 10, 11, 9, 4, 6, 7, 5, 2, 3, 1, 0, 16, 24, 28, 30, 31, 29, 26, 27, 25, 20, 22, 23, 21, 18, 19, 17, 8, 12, 14, 15, 13, 10, 11, 9, 4, 6, 7, 5, 2, 3, 1, 0, 32, 48, 56, 60, 62, 63, 61, 58, 59, 57, 52, 54, 55, 53, 50, 51, 49, 40, 44, 46, 47, 45, 42
Offset: 0
For n = 1, 2, 3, the sets B_n, their subsets (the column under B_n), binary characteristic words (column bin.) and corresponding integers (column dec.) are:
B_1 = {c} bin. dec. | B_2 = {b, c} bin. dec. | B_3 = {a, b, c} bin. dec.
{} 0 0 | {} 00 0 | {} 000 0
{c} 1 1 | {b} 10 2 | {a} 100 4
| {b, c} 11 3 | {a, b} 110 6
| {c} 01 1 | {a, b, c} 111 7
| {a, c} 101 5
| {b} 010 2
| {b, c} 011 3
| {c} 001 1
As seen, when B = {a, b, c}, its subsets {}, {a}, {a, b}, {a, b, c}, {a, c}, {b}, {b, c}, {c} are in lexicographic order, the corresponding binary words of length 3 are 000, 100, 110, 111, 101, 010, 011, 001, and so row(3) = 0, 4, 6, 7, 5, 2, 3, 1.
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, 3, 1;
n=3: 0, 4, 6, 7, 5, 2, 3, 1;
n=4: 0, 8, 12, 14, 15, 13, 10, 11, 9, 4, 6, 7, 5, 2, 3, 1;
n=5: 0, 16, 24, 28, 30, 31, 29, 26, 27, 25, 20, 22, 23, 21, 18, 19, 17, 8, 12, 14, 15, 13, 10, 11, 9, 4, 6, 7, 5, 2, 3, 1,
...
- Donald E. Knuth, The Art of Computer Programming, Volume 4A, Section 7.2.1.3 Exercise 19 (Binomial tree traversed in post-order).
- Valentin Bakoev, Table of n, a(n) for n = 0..1023
- Joerg Arndt, Matters Computational (The Fxtbook), section 1.26 "Binary words in lexicographic order for subsets", pp. 70-74.
- Joerg Arndt, Subset-lex: did we miss an order?, arXiv:1405.6503 [math.CO], 2014-2015.
- Valentin Bakoev, An Algorithm for Generating All Subsets in Lexicographic Order, ICAI 2022, pp. 271-275.
Cf.
A006516 (row sums),
A000225 (main diagonal, the n-th term of row(n)).
row(n) without leading 0, when read in reverse order, gives the first 2^n-1 terms of
A108918.
-
(* computing row(n) *)
n = 5;
Array[row, 2^n];
row[0] = 0; row[1] = 1;
len = 2;
For[i = 2, i <= n, i++,
For[j = 1, j < len, j++, row[j + len] = row[j]];
For[j = len, j > 0, j--, row[j] = row[j - 1] + len];
len = len*2;
];
Showing 1-4 of 4 results.
Comments