A239829
Triangular array: T(n,k) = number of partitions of 2n - 1 that have alternating sum 2k - 1.
Original entry on oeis.org
1, 2, 1, 4, 2, 1, 7, 5, 2, 1, 12, 10, 5, 2, 1, 19, 19, 10, 5, 2, 1, 30, 33, 20, 10, 5, 2, 1, 45, 57, 36, 20, 10, 5, 2, 1, 67, 92, 64, 36, 20, 10, 5, 2, 1, 97, 147, 107, 65, 36, 20, 10, 5, 2, 1, 139, 227, 177, 110, 65, 36, 20, 10, 5, 2, 1, 195, 345, 282, 184
Offset: 1
First nine rows:
1
2 ... 1
4 ... 2 ... 1
7 ... 5 ... 2 ... 1
12 .. 10 .. 5 ... 2 ... 1
19 .. 19 .. 10 .. 5 ... 2 ... 1
30 .. 33 .. 20 .. 10 .. 5 ... 2 ... 1
45 .. 57 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1
67 .. 92 .. 64 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1
The partitions of 5 are 5, 41, 32, 311, 221, 2111, 11111, with respective alternating sums 5, 3, 1, 3, 1, 1, 1, so that row 2 of the array is 4 .. 2 .. 1.
-
b:= proc(n, i, t) option remember; `if`(n=0, x^(1/2), `if`(i<1, 0,
expand(b(n, i-1, t)+`if`(i>n, 0, b(n-i, i, -t)*x^((t*i)/2)))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(2*n-1$2, 1)):
seq(T(n), n=1..14); # Alois P. Heinz, Mar 30 2014
-
z = 15; s[w_] := s[w] = Total[Take[#, ;; ;; 2]] - Total[Take[Rest[#], ;; ;; 2]] &[w]; c[n_] := c[n] = Table[s[IntegerPartitions[n][[k]]], {k, 1, PartitionsP[n]}]; t[n_, k_] := Count[c[2 n - 1], 2 k - 1]; u = Table[t[n, k], {n, 1, z}, {k, 1, n}]
TableForm[u] (* A239829, array *)
Flatten[u] (* A239829, sequence *)
(* Peter J. C. Moses, Mar 21 2014 *)
b[n_, i_, t_] := b[n, i, t] = If[n == 0, x^(1/2), If[i<1, 0, Expand[b[n, i-1, t] + If[i>n, 0, b[n-i, i, -t]*x^((t*i)/2)]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[2n-1, 2n-1, 1]]; Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Aug 27 2016, after Alois P. Heinz *)
A008951
Array read by columns: number of partitions of n into parts of 2 kinds.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 4, 1, 5, 7, 2, 7, 12, 5, 11, 19, 9, 1, 15, 30, 17, 2, 22, 45, 28, 5, 30, 67, 47, 10, 42, 97, 73, 19, 1, 56, 139, 114, 33, 2, 77, 195, 170, 57, 5, 101, 272, 253, 92, 10, 135, 373, 365, 147, 20, 176, 508, 525, 227, 35, 1, 231, 684, 738, 345, 62, 2, 297
Offset: 0
Array begins:
m\n 0 1 2 3 4 .5 .6 .7 .8 ...
0 | 1 1 2 3 5 .7 11 15 22 ... (A000041)
1 | . 1 2 4 7 12 19 ... (A000070)
2 | . . . 1 2 .5 .9 ... (A000097)
3 | . . . . . .. .1 ... (A000098)
[1]; [1,1]; [2,2]; [3,4,1]; [5,7,2]; [7,12,5]; [11,19,9,1]...
a(3,1) = 4 because the partitions (3), (1,2) and (1^3) have q values 1,2 and 1 which sum to 4.
a(3,1) = 4 because the exponents of part 1 in the above given partitions of 3 are 0,1,3 and they sum to 4.
a(3,1) = 4 because the partitions of 3-t(1)=2 with two kinds of part 1, say 1 and 1' and one kind of part 2 are (2),(1^2), (1'^2) and (11').
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
-
a:= proc(n, m) option remember; `if`(n<0, 0,
`if`(m=0, combinat[numbpart](n), a(n-m, m-1) +a(n-m, m)))
end:
seq(seq(a(n,m), m=0..round(sqrt(2*n+2))-1), n=0..20); # Alois P. Heinz, Nov 16 2012
-
a[n_, 0] := PartitionsP[n]; a[n_, m_] /; (n >= m*(m+1)/2) := a[n, m] = a[n-m, m-1] + a[n-m, m]; a[n_, m_] = 0; Flatten[ Table[ a[n, m], {n, 0, 18}, {m, 0, Floor[1/2 + Sqrt[2*(n+1)]] - 1}]](* Jean-François Alcover, May 02 2012, after recurrence formula *)
DeleteCases[Flatten@Transpose@Table[ConstantArray[0, m (m + 1)/2]~Join~Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@m], {n, 0, 21 - m (m + 1)/2}] , {m, 0, 6}], 0](* Robert Price, Jul 28 2020 *)
More terms from Robert G Bearden (nem636(AT)myrealbox.com), Apr 27 2004
Correction, comments and Riordan formulas from
Wolfdieter Lang, Apr 28 2005
A103923
Triangle of partitions of n with parts of sizes 1,2,...,m, each of two different kinds, m>=1.
Original entry on oeis.org
1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 5, 7, 5, 2, 1, 7, 12, 9, 5, 2, 1, 11, 19, 17, 10, 5, 2, 1, 15, 30, 28, 19, 10, 5, 2, 1, 22, 45, 47, 33, 20, 10, 5, 2, 1, 30, 67, 73, 57, 35, 20, 10, 5, 2, 1, 42, 97, 114, 92, 62, 36, 20, 10, 5, 2, 1, 56, 139, 170, 147, 102, 64, 36, 20, 10, 5, 2, 1, 77, 195
Offset: 0
Triangle starts:
[1];
[1,1];
[2,2,1];
[3,4,2,1];
[5,7,5,2,1];
...
a(4,2)=5 from the partitions of 4-2=2 with two varieties of parts 1 and of 2, namely (2),(2'),(1^2),(1'^2) and (1,1').
a(4,2)=5 from the partitions of 4+t(2)-2=5 which have products of the exponents of parts 1 and 2: 0*0,1*0,0*1,2*1,1*2,5*0 and sum to 4.
a(4,2)=5 from the partitions of 4+t(2)-2=5 which have number of distinct parts (q values) 1,2,2,2,2,2,1. The corresponding binomial(q,2) values are 0,1,1,1,1,0 and sum to 4.
a(4,2)=5 from the partitions of 2*4-2=6 with exactly two odd parts, namely (1,5), (3^2), (1^2,4), (1,2,3) and (1^2,2^2), which are 5 in number.
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), pp. 90-121.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
-
with(numtheory):
b:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*
`if`(d<=k, 2, 1), d=divisors(j)) *b(n-j, k), j=1..n)/n)
end:
A:= (n, k)-> b(n, k) -`if`(k=0, 0, b(n, k-1)):
seq(seq(A(n, k), k=0..n), n=0..14); # Alois P. Heinz, Sep 14 2014
-
a[n_, 0] := a[n, 0] = PartitionsP[n]; a[n_, m_] /; n= m >= 0 := a[n, m] = a[n-1, m-1] + a[n-m, m]; Table[a[n, m], {n, 0, 14}, {m, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2014 *)
Flatten@Table[Length@IntegerPartitions[n-m, All, Range@n~Join~Range@m], {n, 0, 12}, {m, 0, n}] (* Robert Price, Jul 29 2020 *)
A103929
Number of partitions of n into parts but with two kinds of parts of sizes 1 to 10.
Original entry on oeis.org
1, 2, 5, 10, 20, 36, 65, 110, 185, 300, 481, 751, 1162, 1762, 2647, 3918, 5748, 8331, 11981, 17056, 24108, 33787, 47043, 65019, 89336, 121954, 165585, 223542, 300295, 401331, 533937, 707057, 932404, 1224376, 1601571, 2086851, 2709449, 3505228
Offset: 0
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), p. 91.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
Eleventh column (m=10) of Fine-Riordan triangle
A008951 and of triangle
A103923, i.e. the p_2(n, m) array of the Gupta et al. reference.
Cf.
A000712 (all parts of two kinds).
-
nmax=60; CoefficientList[Series[Product[1/(1-x^k), {k, 1, 10}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2015 *)
Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@10], {n,0,37}] (* Robert Price, Jul 29 2020 *)
T[n_, 0] := PartitionsP[n];
T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
T[, ] = 0;
a[n_] := T[n + 55, 10];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
A103925
Number of partitions of n into parts but with two kinds of parts of sizes 1,2,3,4,5 and 6.
Original entry on oeis.org
1, 2, 5, 10, 20, 36, 65, 109, 182, 292, 463, 714, 1091, 1631, 2416, 3523, 5091, 7264, 10284, 14405, 20035, 27621, 37831, 51425, 69497, 93299, 124588, 165408, 218533, 287231, 375851, 489525, 634980, 820195, 1055444, 1352965, 1728326, 2200060, 2791516, 3530513
Offset: 0
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), p. 90.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
Seventh column (m=6) of Fine-Riordan triangle
A008951, of triangle
A103923, i.e. the p_2(n, m) array of the Gupta et al. reference.
Cf.
A000712 (all parts of two kinds).
-
with(numtheory): a:= proc(n) option remember; `if`(n=0, 1, add(add(d*`if`(d<7, 2, 1), d=divisors(j)) *a(n-j), j=1..n)/n) end: seq(a(n), n=0..40); # Alois P. Heinz, Sep 14 2014
-
nmax=60; CoefficientList[Series[Product[1/(1-x^k), {k, 1, 6}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2015 *)
Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@6], {n,0,39}] (* Robert Price, Jul 29 2020 *)
T[n_, 0] := PartitionsP[n];
T[n_, m_] /; (n >= m(m+1)/2) := T[n, m] = T[n-m, m-1] + T[n-m, m];
T[, ] = 0;
a[n_] := T[n+21, 6];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
A103926
Number of partitions of n into parts but with two kinds of parts of sizes 1 to 7.
Original entry on oeis.org
1, 2, 5, 10, 20, 36, 65, 110, 184, 297, 473, 734, 1127, 1696, 2526, 3707, 5388, 7737, 11018, 15532, 21731, 30147, 41538, 56813, 77234, 104317, 140120, 187139, 248680, 328769, 432664, 566759, 739297, 960315, 1242583, 1601645, 2057095, 2632724
Offset: 0
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), p. 90.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
Eighth column (m=7) of Fine-Riordan triangle
A008951 and of triangle
A103923, i.e. the p_2(n, m) array of the Gupta et al. reference.
Cf.
A000712 (all parts of two kinds).
-
nmax=60; CoefficientList[Series[Product[1/(1-x^k), {k, 1, 7}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2015 *)
Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@7], {n,0,37}] (* Robert Price, Jul 29 2020 *)
T[n_, 0] := PartitionsP[n];
T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
T[, ] = 0;
a[n_] := T[n + 28, 7];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
A103927
Number of partitions of n into parts but with two kinds of parts of sizes 1 to 8.
Original entry on oeis.org
1, 2, 5, 10, 20, 36, 65, 110, 185, 299, 478, 744, 1147, 1732, 2591, 3817, 5573, 8036, 11496, 16276, 22878, 31879, 44129, 60630, 82807, 112353, 151616, 203415, 271558, 360648, 476793, 627389, 822104, 1072668, 1394199, 1805060, 2328653, 2993372, 3835068, 4897199
Offset: 0
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), p. 90.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
Ninth column (m=8) of Fine-Riordan triangle
A008951 and of triangle
A103923, i.e., the p_2(n, m) array of the Gupta et al. reference.
Cf.
A000712 (all parts of two kinds).
-
a:= proc(n) option remember; `if`(n=0, 1, add(add(d+
`if`(d<9, d, 0), d=divisors(j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..40); # Alois P. Heinz, Jun 11 2018
-
nmax=60; CoefficientList[Series[Product[1/(1-x^k), {k, 1, 8}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2015 *)
Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@8], {n,0,39}] (* Robert Price, Jul 29 2020 *)
T[n_, 0] := PartitionsP[n];
T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
T[, ] = 0;
a[n_] := T[n + 36, 8];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
A103928
Number of partitions of n into parts but with two kinds of parts of sizes 1 to 9.
Original entry on oeis.org
1, 2, 5, 10, 20, 36, 65, 110, 185, 300, 480, 749, 1157, 1752, 2627, 3882, 5683, 8221, 11796, 16756, 23627, 33036, 45881, 63257, 86689, 118036, 159837, 215211, 288314, 384275, 509829, 673270, 885361, 1159357, 1512235, 1964897, 2543864, 3281686
Offset: 0
- H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), p. 91.
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
Tenth column (m=9) of Fine-Riordan triangle
A008951 and of triangle
A103923, i.e., the p_2(n, m) array of the Gupta et al. reference.
Cf.
A000712 (all parts of two kinds).
-
nmax=60; CoefficientList[Series[Product[1/(1-x^k), {k, 1, 9}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2015 *)
Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@9], {n,0,37}] (* Robert Price, Jul 29 2020 *)
T[n_, 0] := PartitionsP[n];
T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
T[, ] = 0;
a[n_] := T[n + 45, 9];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
Showing 1-8 of 8 results.
Comments