[go: up one dir, main page]

login
Search: a003056 -id:a003056
     Sort: relevance | references | number | modified | created      Format: long | short | data
Irregular triangle read by rows: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts (n>=1, 1<=k<=A003056(n)).
+20
272
1, 2, 2, 1, 3, 1, 3, 2, 4, 1, 1, 4, 2, 1, 5, 2, 1, 5, 2, 2, 6, 2, 1, 1, 6, 3, 1, 1, 7, 2, 2, 1, 7, 3, 2, 1, 8, 3, 1, 2, 8, 3, 2, 1, 1, 9, 3, 2, 1, 1, 9, 4, 2, 1, 1, 10, 3, 2, 2, 1, 10, 4, 2, 2, 1, 11, 4, 2, 1, 2, 11, 4, 3, 1, 1, 1, 12, 4, 2, 2, 1, 1, 12, 5, 2, 2, 1, 1, 13, 4, 3, 2, 1, 1, 13, 5, 3, 1, 2, 1, 14, 5, 2, 2, 2, 1
OFFSET
1,2
COMMENTS
The original name was: Triangle read by rows: T(n,k) = A235791(n,k) - A235791(n,k+1), assuming that the virtual right border of triangle A235791 is A000004.
T(n,k) is also the length of the k-th segment in a zig-zag path on the first quadrant of the square grid, connecting the point (n, 0) with the point (m, m), starting with a segment in vertical direction, where m <= n.
Conjecture: the area of the polygon defined by the x-axis, this zig-zag path and the diagonal [(0, 0), (m, m)], is equal to A024916(n)/2, one half of the sum of all divisors of all positive integers <= n. Therefore the reflected polygon, which is adjacent to the y-axis, with the zig-zag path connecting the point (0, n) with the point (m, m), has the same property. And so on for each octant in the four quadrants.
For the representation of A024916 and A000203 we use two octants, for example: the first octant and the second octant, or the 6th octant and the 7th octant, etc., see A237593.
At least up to n = 128, two zig-zag paths never cross (checked by hand).
The finite sequence formed by the n-th row of triangle together with its mirror row gives the n-th row of triangle A237593.
The connection between A196020 and A237271 is as follows: A196020 --> A236104 --> A235791 --> this sequence --> A237593 --> A239660 --> A237270 --> A237271.
Comments from Franklin T. Adams-Watters on sequences related to the "symmetric representation of sigma" in A235791 and related sequences, Mar 31 2014. (Start)
The place to start is with A235791, which is very simple. Then go to A237591, also very simple, and A237593, still very simple.
You then need to interpret the rows of A237593 as Dyck paths. This interpretation is in terms of run lengths, so 2,1,1,2 means up twice, down once, up once, and down twice. Because the rows of A237593 are symmetric and of even length, this path will always be symmetric.
Now the surprising fact is that the areas enclosed by the Dyck path for n (laid on its side) always includes the area enclosed for n-1; and the number of squares added is sigma(n).
Finally, look at the connected areas enclosed by n but not by n-1; the size of these areas is the symmetric representation of sigma. (End)
From Hartmut F. W. Hoft, Apr 07 2014: (Start)
The row sum is A235791(n,1) - A235791(n,floor((sqrt(8n+1)-1)/2)+1) = n - 0.
Mathematica function has been written to check the conjecture as well as non-crossing zig-zag paths (Dyck paths rotated by 90 degrees) up through n=30000 (same applies to A237593). (End)
The n-th zig-zag path ending at the point (m, m), where m = A240542(n). - Omar E. Pol, Apr 16 2014
From Omar E. Pol, Aug 23 2015: (Start)
n is an odd prime if and only if T(n,2) = 1 + T(n-1,2) and T(n,k) = T(n-1,k) for the rest of the values of k.
The elements of the n-th row of triangle together with the elements of the n-th row of triangle A261350 give the n-th row of triangle A237593.
T(n,k) is also the area (or the number of cells) of the k-th vertical side at the n-th level (starting from the top) in the left hand part of the front view of the stepped pyramid described in A245092, see Example section.
(End)
From Omar E. Pol, Nov 19 2015: (Start)
T(n,k) is also the number of cells between the k-th and the (k+1)st line segments (from left to right) in the n-th row of the diagram as shown in Example section.
Note that the number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of odd divisors of n. (End)
Conjecture: the values f(n,k) in the n-th row of the triangle are either 1 or 2 for all k with ceiling((sqrt(4*n+1)-1)/2) <= k <= floor((sqrt(8*n+1)-1)/2) = r(n), the length of the n-th row, though the lower bound need not be minimal; tested through 2500000. See also A285356. - Hartmut F. W. Hoft, Apr 17 2017
Conjecture: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts. - Omar E. Pol, Apr 30 2017
From Omar E. Pol, Aug 31 2021: (Start)
It appears that T(n,2)/T(n,1) converges to 1/3.
It appears that T(n,3)/T(n,2) converges to 1/2.
It appears that T(n,4)/T(n,3) converges to 3/5.
It appears that T(n,5)/T(n,4) converges to 2/3. (End)
In other words: T(n,k) is the length of the k-th line segment of the largest Dyck path of the symmetric representation of sigma(n). - Omar E. Pol, Sep 08 2021
FORMULA
T(n,k) = ceiling((n+1)/k - (k+1)/2) - ceiling((n+1)/(k+1) - (k+2)/2), for 1 <= n and 1 <= k <= floor((sqrt(8n+1)-1)/2). - Hartmut F. W. Hoft, Apr 07 2014
EXAMPLE
Triangle begins:
1;
2;
2, 1;
3, 1;
3, 2;
4, 1, 1;
4, 2, 1;
5, 2, 1;
5, 2, 2;
6, 2, 1, 1;
6, 3, 1, 1;
7, 2, 2, 1;
7, 3, 2, 1;
8, 3, 1, 2;
8, 3, 2, 1, 1;
9, 3, 2, 1, 1;
9, 4, 2, 1, 1;
10, 3, 2, 2, 1;
10, 4, 2, 2, 1;
11, 4, 2, 1, 2;
11, 4, 3, 1, 1, 1;
12, 4, 2, 2, 1, 1;
12, 5, 2, 2, 1, 1;
13, 4, 3, 2, 1, 1;
13, 5, 3, 1, 2, 1;
14, 5, 2, 2, 2, 1;
14, 5, 3, 2, 1, 2;
15, 5, 3, 2, 1, 1, 1;
...
For n = 10 the 10th row of triangle A235791 is [10, 4, 2, 1] so row 10 is [6, 2, 1, 1].
From Omar E. Pol, Aug 23 2015: (Start)
Illustration of initial terms:
Row _
1 _|1|
2 _|2 _|
3 _|2 |1|
4 _|3 _|1|
5 _|3 |2 _|
6 _|4 _|1|1|
7 _|4 |2 |1|
8 _|5 _|2 _|1|
9 _|5 |2 |2 _|
10 _|6 _|2 |1|1|
11 _|6 |3 _|1|1|
12 _|7 _|2 |2 |1|
13 _|7 |3 |2 _|1|
14 _|8 _|3 _|1|2 _|
15 _|8 |3 |2 |1|1|
16 _|9 _|3 |2 |1|1|
17 _|9 |4 _|2 _|1|1|
18 _|10 _|3 |2 |2 |1|
19 _|10 |4 |2 |2 _|1|
20 _|11 _|4 _|2 |1|2 _|
21 _|11 |4 |3 _|1|1|1|
22 _|12 _|4 |2 |2 |1|1|
23 _|12 |5 _|2 |2 |1|1|
24 _|13 _|4 |3 |2 _|1|1|
25 _|13 |5 |3 _|1|2 |1|
26 _|14 _|5 _|2 |2 |2 _|1|
27 _|14 |5 |3 |2 |1|2 _|
28 |15 |5 |3 |2 |1|1|1|
...
Also the diagram represents the left part of the front view of the pyramid described in A245092. For the other half front view see A261350. For more information about the pyramid and the symmetric representation of sigma see A237593. (End)
From Omar E. Pol, Sep 08 2021: (Start)
For n = 12 the symmetric representation of sigma(12) in the fourth quadrant is as shown below: _
| |
| |
| |
| |
| |
_ _ _| |
_| _ _|
_| |
| _|
| _ _|1
_ _ _ _ _ _| | 2
|_ _ _ _ _ _ _|2
7
.
The lengths of the successive line segments from the first vertex to the central vertex of the largest Dyck path are [7, 2, 2, 1] respectively, the same as the 12th row of triangle. (End)
MATHEMATICA
row[n_]:= Floor[(Sqrt[8*n+1] -1)/2]; f[n_, k_]:= Ceiling[(n+1)/k-(k+1)/2] - Ceiling[(n+1)/(k+1)-(k+2)/2];
Table[f[n, k], {n, 1, 50}, {k, 1, row[n]}]//Flatten
(* Hartmut F. W. Hoft, Apr 08 2014 *)
PROG
(PARI) row235791(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i);
row(n) = {my(orow = concat(row235791(n), 0)); vector(#orow -1, i, orow[i] - orow[i+1]); } \\ Michel Marcus, Mar 27 2014
(Python)
from sympy import sqrt
import math
def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
for n in range(1, 29): print([T(n, k) for k in range(1, int((sqrt(8*n + 1) - 1)/2) + 1)]) # Indranil Ghosh, Apr 30 2017
CROSSREFS
Row n has length A003056(n) hence column k starts in row A000217(k).
Row sums give A000027.
Column 1 is A008619, n >= 1.
Right border gives A042974.
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Feb 22 2014
EXTENSIONS
3 more rows added by Omar E. Pol, Aug 23 2015
New name from a comment dated Apr 30 2017. - Omar E. Pol, Jun 18 2023
STATUS
approved
Triangle T(n,k) read by rows = number of partitions of n-set into k blocks with distinct sizes, k = 1..A003056(n).
+20
16
1, 1, 1, 3, 1, 4, 1, 15, 1, 21, 60, 1, 63, 105, 1, 92, 448, 1, 255, 2016, 1, 385, 4980, 12600, 1, 1023, 15675, 27720, 1, 1585, 61644, 138600, 1, 4095, 155155, 643500, 1, 6475, 482573, 4408404, 1, 16383, 1733550, 12687675, 37837800, 1, 26332, 4549808, 60780720
OFFSET
1,4
COMMENTS
Row sums = A007837.
Sum k! * T(n,k) = A032011.
Sum k * T(n,k) = A131623. - Geoffrey Critzer, Aug 30 2012.
T(n,k) is also the number of words w of length n over a k-ary alphabet {a1,a2,...,ak} with #(w,a1) > #(w,a2) > ... > #(w,ak) > 0, where #(w,x) counts the letters x in word w. T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa. - Alois P. Heinz, Jun 21 2013
LINKS
FORMULA
E.g.f.: Product_{n>=1} (1+y*x^n/n!).
T(A000217(n),n) = A022915(n). - Alois P. Heinz, Jul 03 2018
EXAMPLE
Triangle T(n,k)begins:
1;
1;
1, 3;
1, 4;
1, 15;
1, 21, 60;
1, 63, 105;
1, 92, 448;
1, 255, 2016;
1, 385, 4980, 12600;
1, 1023, 15675, 27720;
1, 1585, 61644, 138600;
1, 4095, 155155, 643500;
1, 6475, 482573, 4408404;
1, 16383, 1733550, 12687675, 37837800;
...
MAPLE
b:= proc(n, i, t, v) option remember; `if`(t=1, 1/(n+v)!,
add(b(n-j, j, t-1, v+1)/(j+v)!, j=i..n/t))
end:
T:= (n, k)->`if`(k*(k+1)/2>n, 0, n!*b(n-k*(k+1)/2, 0, k, 1)):
seq(seq(T(n, k), k=1..floor(sqrt(2+2*n)-1/2)), n=1..20);
# Alois P. Heinz, Jun 21 2013
# second Maple program:
b:= proc(n, i) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, 1, b(n, i-1)+binomial(n, i)*
expand(x*b(n-i, min(n-i, i-1)))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
seq(T(n), n=1..20); # Alois P. Heinz, Sep 27 2019
MATHEMATICA
nn=10; p=Product[1+y x^i/i!, {i, 1, nn}]; Range[0, nn]! CoefficientList[ Series[p, {x, 0, nn}], {x, y}]//Grid (* Geoffrey Critzer, Aug 30 2012 *)
KEYWORD
nonn,tabf
AUTHOR
Vladeta Jovovic, Sep 04 2007
STATUS
approved
Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k parts p at position p (fixed points), n>=0, 0<=k<=A003056(n).
+20
16
1, 0, 1, 1, 1, 2, 1, 1, 3, 4, 1, 6, 7, 3, 11, 16, 4, 1, 22, 29, 12, 1, 42, 60, 23, 3, 82, 120, 47, 7, 161, 238, 100, 12, 1, 316, 479, 198, 30, 1, 624, 956, 404, 61, 3, 1235, 1910, 818, 126, 7, 2449, 3817, 1652, 258, 16, 4864, 7633, 3319, 537, 30, 1, 9676, 15252, 6686, 1083, 70, 1, 19267, 30491, 13426, 2205
OFFSET
0,6
REFERENCES
M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.
LINKS
Joerg Arndt and Alois P. Heinz, Rows n = 0..500, flattened
M. Archibald, A. Blecher, and A. Knopfmacher, Fixed Points in Compositions and Words, J. Int. Seq., Vol. 23 (2020), Article 20.11.1.
FORMULA
Sum_{k=0..A003056(n)} k * T(n,k) = A099036(n-1) for n>0.
EXAMPLE
Triangle T(n,k) begins:
00 : 1;
01 : 0, 1;
02 : 1, 1;
03 : 2, 1, 1;
04 : 3, 4, 1;
05 : 6, 7, 3;
06 : 11, 16, 4, 1;
07 : 22, 29, 12, 1;
08 : 42, 60, 23, 3;
09 : 82, 120, 47, 7;
10 : 161, 238, 100, 12, 1;
11 : 316, 479, 198, 30, 1;
12 : 624, 956, 404, 61, 3;
...
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, expand(
add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n)))
end:
T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, 1)):
seq(T(n), n=0..20);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, Expand[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 1]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)
CROSSREFS
Row sums are A011782.
T(n*(n+3)/2,n) = A227682(n).
Same as A238349 without the trailing zeros.
Cf. A099036.
KEYWORD
nonn,tabf
AUTHOR
Joerg Arndt and Alois P. Heinz, Feb 25 2014
STATUS
approved
Number T(n,k) of endofunctions on [n] with cycles of k distinct lengths; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.
+20
14
1, 0, 1, 0, 4, 0, 24, 3, 0, 206, 50, 0, 2300, 825, 0, 31742, 14794, 120, 0, 522466, 294987, 6090, 0, 9996478, 6547946, 232792, 0, 218088504, 160994565, 8337420, 0, 5344652492, 4355845868, 299350440, 151200, 0, 145386399554, 128831993037, 11074483860, 18794160
OFFSET
0,5
LINKS
EXAMPLE
T(3,2) = 3: (1,3,2), (3,2,1), (2,1,3).
Triangle T(n,k) begins:
00 : 1;
01 : 0, 1;
02 : 0, 4;
03 : 0, 24, 3;
04 : 0, 206, 50;
05 : 0, 2300, 825;
06 : 0, 31742, 14794, 120;
07 : 0, 522466, 294987, 6090;
08 : 0, 9996478, 6547946, 232792;
09 : 0, 218088504, 160994565, 8337420;
10 : 0, 5344652492, 4355845868, 299350440, 151200;
MAPLE
with(combinat):
b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
`if`(i<1 or k<1, 0, add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
b(n-i*j, i-1, k-`if`(j=0, 0, 1)), j=0..n/i)))
end:
T:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j$2, k), j=0..n):
seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..14);
MATHEMATICA
multinomial[n_, k_] := n!/Times @@ (k!); b[n_, i_, k_] := b[n, i, k] = If[n == 0, If[k==0, 1, 0], If[i<1 || k<1, 0, Sum[(i-1)!^j*multinomial[n, Join[ {n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1, k-If[j==0, 0, 1]], {j, 0, n/i}]] ]; T[0, 0] = 1; T[n_, k_] := Sum[Binomial[n-1, j-1]*n^(n-j)*b[j, j, k], {j, 0, n}]; Table[T[n, k], {n, 0, 14}, {k, 0, Floor[(Sqrt[1+8n]-1)/2]}] // Flatten (* Jean-François Alcover, Feb 18 2017, translated from Maple *)
CROSSREFS
Row sums give A000312.
T(A000217(n),n) gives A246292.
Cf. A003056, A060281, A218868 (the same for permutations).
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Aug 11 2014
STATUS
approved
Sum T(n,k) over all partitions lambda of n into k distinct parts of Product_{i:lambda} prime(i); triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.
+20
14
1, 0, 2, 0, 3, 0, 5, 6, 0, 7, 10, 0, 11, 29, 0, 13, 43, 30, 0, 17, 94, 42, 0, 19, 128, 136, 0, 23, 231, 293, 0, 29, 279, 551, 210, 0, 31, 484, 892, 330, 0, 37, 584, 1765, 852, 0, 41, 903, 2570, 1826, 0, 43, 1051, 4273, 4207, 0, 47, 1552, 6747, 6595, 2310
OFFSET
0,3
LINKS
EXAMPLE
T(6,2) = 43 because the partitions of 6 into 2 distinct parts are {[5,1], [4,2]} and prime(5)*prime(1) + prime(4)*prime(2) = 11*2 + 7*3 = 22 + 21 = 43.
Triangle T(n,k) begins:
1
0, 2;
0, 3;
0, 5, 6;
0, 7, 10;
0, 11, 29;
0, 13, 43, 30;
0, 17, 94, 42;
0, 19, 128, 136;
0, 23, 231, 293;
0, 29, 279, 551, 210;
MAPLE
g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, expand(
add(g(n-i*j, i-1)*(ithprime(i)*x)^j, j=0..min(1, n/i)))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(g(n$2)):
seq(T(n), n=0..20);
MATHEMATICA
g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Expand[Sum[g[n-i*j, i-1] * (Prime[i]*x)^j, {j, 0, Min[1, n/i]}]]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][g[n, n]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jan 06 2017, after Alois P. Heinz *)
CROSSREFS
Row sums give A147655.
T(n*(n+1)/2,n) = A002110(n).
T(n^2,n) = A321267(n).
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 26 2015
STATUS
approved
Number T(n,k) of partitions of n into colored blocks of equal parts, such that all colors from a set of size k are used and the colors are introduced in increasing order; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.
+20
14
1, 0, 1, 0, 2, 0, 3, 1, 0, 5, 2, 0, 7, 5, 0, 11, 9, 1, 0, 15, 17, 2, 0, 22, 28, 5, 0, 30, 47, 10, 0, 42, 74, 21, 1, 0, 56, 116, 37, 2, 0, 77, 175, 67, 5, 0, 101, 263, 112, 10, 0, 135, 385, 187, 20, 0, 176, 560, 302, 40, 1, 0, 231, 800, 479, 72, 2, 0, 297, 1135, 741, 127, 5
OFFSET
0,5
COMMENTS
T(n,k) is defined for all n>=0 and k>=0. The triangle contains only elements with 0 <= k <= A003056(n). T(n,k) = 0 for k > A003056(n).
For fixed k>=1, T(n,k) ~ exp(sqrt(2*(Pi^2 - 6*polylog(2, 1-k))*n/3)) * sqrt(Pi^2 - 6*polylog(2, 1-k)) / (4*k!*sqrt(3*k)*Pi*n). - Vaclav Kotesovec, Sep 18 2019
LINKS
FORMULA
T(n,k) = 1/k! * Sum_{i=0..k} (-1)^i*binomial(k,i) A321884(n,k-i).
T(n*(n+1)/2,n) = T(A000217(n),n) = 1.
T(n*(n+3)/2,n) = T(A000096(n),n) = A000712(n).
Sum_{k=1..A003056(n)} k * T(n,k) = A322304(n).
EXAMPLE
T(6,1) = 11: 111111a, 2a1111a, 22a11a, 222a, 3a111a, 3a2a1a, 33a, 4a11a, 4a2a, 5a1a, 6a.
T(6,2) = 9: 2a1111b, 22a11b, 3a111b, 3a2a1b, 3a2b1a, 3a2b1b, 4a11b, 4a2b, 5a1b.
T(6,3) = 1: 3a2b1c.
Triangle T(n,k) begins:
1;
0, 1;
0, 2;
0, 3, 1;
0, 5, 2;
0, 7, 5;
0, 11, 9, 1;
0, 15, 17, 2;
0, 22, 28, 5;
0, 30, 47, 10;
0, 42, 74, 21, 1;
0, 56, 116, 37, 2;
0, 77, 175, 67, 5;
...
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
(t-> b(t, min(t, i-1), k))(n-i*j), j=1..n/i)*k+b(n, i-1, k)))
end:
T:= (n, k)-> add(b(n$2, k-i)*(-1)^i*binomial(k, i), i=0..k)/k!:
seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..20);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[With[{t = n - i j}, b[t, Min[t, i - 1], k]], {j, 1, n/i}] k + b[n, i - 1, k]]];
T[n_, k_] := Sum[b[n, n, k - i] (-1)^i Binomial[k, i], {i, 0, k}]/k!;
Table[Table[T[n, k], {k, 0, Floor[(Sqrt[1 + 8n] - 1)/2]}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)
CROSSREFS
Columns k=0-10 give: A000007, A000041 (for n>0), A327285, A327286, A327287, A327288, A327289, A327290, A327291, A327292, A327293.
Row sums give A305106.
KEYWORD
nonn,look,tabf
AUTHOR
Alois P. Heinz, Aug 27 2019
STATUS
approved
2^A003056: 2^n appears n+1 times.
+20
12
1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024, 1024, 1024, 1024
OFFSET
0,2
COMMENTS
First differences of A007664.
Viewed as a triangle, it is computed like Pascal's triangle, but with 2^n on the triangle edges. - T. D. Noe, Jul 31 2013
From Paul Curtz, Oct 23 2018: (Start)
Oresme numbers O(n) = n/2^n are an autosequence of the first kind. The corresponding sequence of the second kind is 1/2^n. The difference table is
1 1/2 1/4 1/8 ...
-1/2 -1/4 -1/8 -1/16 ...
1/4 1/8 1/16 1/32 ...
-1/8 -1/16 -1/32 -1/64 ...
etc.
The denominators on the antidiagonals are a(n). (End)
LINKS
Vincenzo Librandi, Rows n = 0..100, flattened
FORMULA
a(n) = 2^[sqrt(2n+2)-.5] = 2^A003056(n) = A007664(n+1) - A007664(n).
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013
Viewed as a triangle T(n,k) : T(n,k)=2*T(n-1,k)+2*T(n-1,k-1)-4*T(n-2,k-1), T(0,0)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Dec 26 2013
Sum_{n>=0} 1/a(n) = 4. - Amiram Eldar, Aug 16 2022
EXAMPLE
Triangle T(n,k) begins:
1
2, 2
4, 4, 4
8, 8, 8, 8
16, 16, 16, 16, 16
32, 32, 32, 32, 32, 32
64, 64, 64, 64, 64, 64, 64
- Philippe Deléham, Dec 26 2013
MAPLE
seq(seq(2^n, k=1..n+1), n=0..10); # Muniru A Asiru, Oct 23 2018
MATHEMATICA
t = {}; Do[r = {}; Do[If[k == 0||k == n, m = 2^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 9}]; t = Flatten[t] (* Vincenzo Librandi, Aug 01 2013 *)
PROG
(PARI) A137688(n)= 1<<floor(sqrt(2*n+2)-.5)
(Haskell)
a137688 n = a137688_list !! n
a137688_list = concat $ zipWith ($) (map replicate [1..]) (map (2^) [0..])
-- Reinhard Zumkeller, Mar 18 2011
(GAP) Flat(List([0..10], n->List([1..n+1], k->2^n))); # Muniru A Asiru, Oct 23 2018
(Python)
from math import isqrt
def A137688(n): return 1<<(isqrt((n<<3)+1)-1>>1) # Chai Wah Wu, Feb 10 2023
CROSSREFS
Cf. A003056, A007664 (gives partial sums).
KEYWORD
easy,nonn,tabl
AUTHOR
M. F. Hasler, Feb 06 2008
STATUS
approved
Number T(n,k) of standard Young tableaux for partitions of n into exactly k distinct parts; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.
+20
12
1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 9, 0, 1, 14, 16, 0, 1, 34, 35, 0, 1, 55, 134, 0, 1, 125, 435, 0, 1, 209, 1213, 768, 0, 1, 461, 3454, 2310, 0, 1, 791, 10484, 11407, 0, 1, 1715, 28249, 44187, 0, 1, 3002, 80302, 200044, 0, 1, 6434, 231895, 680160, 292864
OFFSET
0,8
COMMENTS
T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=A003056(n). T(n,k) = 0 for k>A003056(n).
LINKS
Wikipedia, Young tableau
EXAMPLE
A(4,2) = 3:
+---------+ +---------+ +---------+
| 1 2 3 | | 1 2 4 | | 1 3 4 |
| 4 .-----+ | 3 .-----+ | 2 .-----+
+---+ +---+ +---+
Triangle T(n,k) begins:
1;
0, 1;
0, 1;
0, 1, 2;
0, 1, 3;
0, 1, 9;
0, 1, 14, 16;
0, 1, 34, 35;
0, 1, 55, 134;
0, 1, 125, 435;
0, 1, 209, 1213, 768;
0, 1, 461, 3454, 2310;
0, 1, 791, 10484, 11407;
...
MAPLE
h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
end:
g:= proc(n, i, k, l) `if`(n=0, h(l), `if`(n>k*(i-(k-1)/2), 0,
g(n, i-1, min(k, i-1), l)+`if`(i>n, 0, g(n-i, i-1, k-1, [l[], i]))))
end:
A:= proc(n, k) option remember; `if`(k<0, 0, g(n, n, k, [])) end:
T:= (n, k)-> A(n, k) -A(n, k-1):
seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..20);
MATHEMATICA
h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]!/Product[Product[1+l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}] ];
g[n_, i_, k_, l_] := If[n == 0, h[l], If[n > k*(i-(k-1)/2), 0, g[n, i-1, Min[k, i-1], l] + If[i > n, 0, g[n-i, i-1, k-1, Append[l, i]]]]];
a[n_, k_] := a[n, k] = If[k < 0, 0, g[n, n, k, {}]];
t[n_, k_] := a[n, k] - a[n, k-1];
Table[Table[t[n, k], {k, 0, Floor[(Sqrt[1+8*n]-1)/2]}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)
CROSSREFS
Columns k=0-10 give: A000007, A000012 (for n>0), A047171(n) = A037952(n)-1, A219316, A219317, A219318, A219319, A219320, A219321, A219322, A219323.
Row sums give: A218293.
Row lengths are 1 + A003056(n).
T(A000217(k),k) = A005118(k+1).
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Nov 17 2012
STATUS
approved
Recursion counts for summation table A003056 with formula a(y,0) = y, a(y,x) = a((y XOR x),2*(y AND x)).
+20
9
0, 1, 0, 1, 2, 0, 1, 1, 1, 0, 1, 3, 2, 3, 0, 1, 1, 2, 2, 1, 0, 1, 2, 1, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 4, 3, 4, 2, 4, 3, 4, 0, 1, 1, 3, 3, 2, 2, 3, 3, 1, 0, 1, 2, 1, 3, 2, 2, 2, 3, 1, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 0, 1, 3, 2, 3, 1, 3, 2, 3, 1, 3, 2, 3, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0
OFFSET
0,5
COMMENTS
Count the summation table A003056 with recursive formula based on identity A+B = (A XOR B)+ 2*(A AND B) given by Schroeppel and then this table gives the number of recursion steps to get the final result.
For k=1..n-1: T(n,k) = T(n,n-k) = A080080(n-k,k) + 1. - Reinhard Zumkeller, Aug 03 2014
FORMULA
a(n) -> add1c( (n-((trinv(n)*(trinv(n)-1))/2)), (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n) )
MAPLE
add1c := proc(a, b) option remember; if(0 = b) then RETURN(0); else RETURN(1+add_c(XORnos(a, b), 2*ANDnos(a, b))); fi; end;
MATHEMATICA
trinv[n_] := Floor[(1 + Sqrt[1 + 8*n])/2];
add1c[a_, b_] := add1c[a, b] = If[b == 0, 0, 1 + add1c[BitXor[a, b], 2*BitAnd[a, b]]];
a[n_] := add1c[n - (trinv[n]*(trinv[n] - 1))/2, (trinv[n] - 1)* ((1/2)*trinv[n] + 1) - n];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 21 2021, after Maple code *)
PROG
(Haskell)
import Data.Bits (xor, (.&.), shiftL)
a050600 n k = adder 0 (n - k) k where
adder :: Int -> Int -> Int -> Int
adder c u 0 = c
adder c u v = adder (c + 1) (u `xor` v) (shiftL (u .&. v) 1)
a050600_row n = map (a050600 n) $ reverse [0..n]
a050600_tabl = map a050600_row [0..]
-- Reinhard Zumkeller, Aug 02 2014
CROSSREFS
Column 1: A001511, column 2: A050603, column 3: A050604.
Cf. A050601, A050602, A003056, A048720 (for the Maple implementation of trinv and XORnos, ANDnos)
Cf. A080080.
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jun 22 1999
STATUS
approved
Number T(n,k) of compositions of n such that the set of parts is [k]; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.
+20
8
1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 7, 0, 1, 11, 6, 0, 1, 20, 12, 0, 1, 32, 32, 0, 1, 54, 72, 0, 1, 87, 152, 24, 0, 1, 143, 311, 60, 0, 1, 231, 625, 180, 0, 1, 376, 1225, 450, 0, 1, 608, 2378, 1116, 0, 1, 986, 4566, 2544, 120, 0, 1, 1595, 8700, 5752, 360
OFFSET
0,8
LINKS
FORMULA
T(A000217(n),n) = n! = A000142(n).
T(A000124(n),n) = A001710(n+1) for n>=1.
T(A000290(n),n) = T(n^2,n) = A332721(n).
G.f. for column k: C({1..k},x) where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/ (1 - Sum_{i in {s}} (x^i)) with C({},x) = 1. - John Tyler Rascoe, May 25 2024
EXAMPLE
T(6,2) = 11: 1122, 1212, 1221, 2112, 2121, 2211, 11112, 11121, 11211, 12111, 21111.
T(7,3) = 12: 1123, 1132, 1213, 1231, 1312, 1321, 2113, 2131, 2311, 3112, 3121, 3211.
Triangle T(n,k) begins:
1;
0, 1;
0, 1;
0, 1, 2;
0, 1, 3;
0, 1, 7;
0, 1, 11, 6;
0, 1, 20, 12;
0, 1, 32, 32;
0, 1, 54, 72;
0, 1, 87, 152, 24;
0, 1, 143, 311, 60;
0, 1, 231, 625, 180;
0, 1, 376, 1225, 450;
0, 1, 608, 2378, 1116;
0, 1, 986, 4566, 2544, 120;
...
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, t!, 0),
`if`(i<1 or n<i*(i+1)/2, 0, add(b(n-i*j, i-1, t+j)/j!, j=1..n/i)))
end:
T:= (n, k)-> b(n, k, 0):
seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..18);
CROSSREFS
KEYWORD
nonn,look,tabf
AUTHOR
Alois P. Heinz, May 25 2024
STATUS
approved

Search completed in 0.211 seconds