A024786
Number of 2's in all partitions of n.
Original entry on oeis.org
0, 1, 1, 3, 4, 8, 11, 19, 26, 41, 56, 83, 112, 160, 213, 295, 389, 526, 686, 911, 1176, 1538, 1968, 2540, 3223, 4115, 5181, 6551, 8191, 10269, 12756, 15873, 19598, 24222, 29741, 36532, 44624, 54509, 66261, 80524, 97446, 117862, 142029, 171036, 205290, 246211
Offset: 1
From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 7 we have:
--------------------------------------
. Number
Partitions of 7 of 2's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 0
5 + 2 .......................... 1
3 + 2 + 2 ...................... 2
6 + 1 .......................... 0
3 + 3 + 1 ...................... 0
4 + 2 + 1 ...................... 1
2 + 2 + 2 + 1 .................. 3
5 + 1 + 1 ...................... 0
3 + 2 + 1 + 1 .................. 1
4 + 1 + 1 + 1 .................. 0
2 + 2 + 1 + 1 + 1 .............. 2
3 + 1 + 1 + 1 + 1 .............. 0
2 + 1 + 1 + 1 + 1 + 1 .......... 1
1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
. 24 - 13 = 11
.
The difference between the sum of the second column and the sum of the third column of the set of partitions of 7 is 24 - 13 = 11 and equals the number of 2's in all partitions of 7, so a(7) = 11.
(End)
- J. Riordan, Combinatorial Identities, Wiley, 1968, p. 184.
- Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)
- David Benson, Radha Kessar, and Markus Linckelmann, Hochschild cohomology of symmetric groups in low degrees, arXiv:2204.09970 [math.GR], 2022.
- Philip Cuthbertson, Fixed hooks in arbitrary columns of partitions, Integers (2025) Vol. 25, Art. No. A28. See p. 3.
- Manosij Ghosh Dastidar and Sourav Sen Gupta, Generalization of a few results in Integer Partitions, arXiv preprint arXiv:1111.0094 [cs.DM], 2011.
- Emeric Deutsch et al., Problem 11237, Amer. Math. Monthly, 115 (No. 7, 2008), 666-667. [From _Emeric Deutsch_, Aug 13 2008]
- Hung Phuc Hoang and Torsten Mütze, Combinatorial generation via permutation languages. II. Lattice congruences, arXiv:1911.12078 [math.CO], 2019.
- Joseph Vandehey, Digital problems in the theory of partitions, Integers (2024) Vol. 24A, Art. No. A18. See p. 3.
-
b:= proc(n, i) option remember; local f, g;
if n=0 or i=1 then [1, 0]
else f:= b(n, i-1); g:= `if`(i>n, [0$2], b(n-i, i));
[f[1]+g[1], f[2]+g[2]+`if`(i=2, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..50); # Alois P. Heinz, May 18 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 2], {n, 1, 50} ]
(* Second program: *)
b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, 0}, f = b[n, i - 1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + If[i == 2, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 22 2015, after Alois P. Heinz *)
Join[{0}, (1/((1 - x^2) QPochhammer[x]) + O[x]^50)[[3]]] (* Vladimir Reshetnikov, Nov 22 2016 *)
Table[Sum[(1 + (-1)^k)/2 * PartitionsP[n-k], {k, 2, n}], {n, 1, 50}] (* Vaclav Kotesovec, Aug 27 2017 *)
-
from sympy import npartitions
def A024786(n): return sum(npartitions(n-(k<<1)) for k in range(1,(n>>1)+1)) # Chai Wah Wu, Oct 25 2023
A182714
Number of 4's in the last section of the set of partitions of n.
Original entry on oeis.org
0, 0, 0, 1, 0, 1, 1, 3, 2, 5, 5, 10, 10, 17, 19, 31, 34, 51, 60, 86, 100, 139, 165, 223, 265, 349, 418, 543, 648, 827, 992, 1251, 1495, 1866, 2230, 2758, 3289, 4033, 4803, 5852, 6949, 8411, 9973, 12005, 14194, 17002, 20060, 23919, 28153, 33426, 39256, 46438
Offset: 1
a(8) = 3 counts the 4's in 8 = 4+4 = 4+2+2. The 4's in 8 = 4+3+1 = 4+2+1+1 = 4+1+1+1+1 do not count.
From _Omar E. Pol_, Oct 25 2012: (Start)
--------------------------------------
Last section Number
of the set of of
partitions of 8 4's
--------------------------------------
8 .............................. 0
4 + 4 .......................... 2
5 + 3 .......................... 0
6 + 2 .......................... 0
3 + 3 + 2 ...................... 0
4 + 2 + 2 ...................... 1
2 + 2 + 2 + 2 .................. 0
. 1 .......................... 0
. 1 ...................... 0
. 1 ...................... 0
. 1 .................. 0
. 1 ...................... 0
. 1 .................. 0
. 1 .................. 0
. 1 .............. 0
. 1 .................. 0
. 1 .............. 0
. 1 .............. 0
. 1 .......... 0
. 1 .......... 0
. 1 ...... 0
. 1 .. 0
------------------------------------
. 6 - 3 = 3
.
In the last section of the set of partitions of 8 the difference between the sum of the fourth column and the sum of the fifth column is 6 - 3 = 3 equaling the number of 4's, so a(8) = 3 (see also A024788).
(End)
-
b:= proc(n, i) option remember; local g, h;
if n=0 then [1, 0]
elif i<2 then [0, 0]
else g:= b(n, i-1); h:= `if`(i>n, [0, 0], b(n-i, i));
[g[1]+h[1], g[2]+h[2]+`if`(i=4, h[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq (a(n), n=1..70); # Alois P. Heinz, Mar 19 2012
-
z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 3]], {n, 0, z}] (* Clark Kimberling, Apr 01 2014 *)
b[n_, i_] := b[n, i] = Module[{g, h}, If[n==0, {1, 0}, If[i<2, {0, 0}, g = b[n, i-1]; h = If[i>n, {0, 0}, b[n-i, i]]; {g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i==4, h[[1]], 0]}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Sep 21 2015, after Alois P. Heinz *)
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 4], {n, 52}] (* Robert Price, May 15 2020 *)
-
A182714 = lambda n: sum(list(p).count(4) for p in Partitions(n) if 1 not in p)
A024787
Number of 3's in all partitions of n.
Original entry on oeis.org
0, 0, 1, 1, 2, 4, 6, 9, 15, 21, 31, 45, 63, 87, 122, 164, 222, 298, 395, 519, 683, 885, 1146, 1475, 1887, 2401, 3050, 3845, 4837, 6060, 7563, 9402, 11664, 14405, 17751, 21807, 26715, 32634, 39784, 48352, 58649, 70969, 85690, 103232, 124143, 148951, 178407, 213277, 254509
Offset: 1
From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 7 we have:
--------------------------------------
. Number
Partitions of 7 of 3's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 1
5 + 2 .......................... 0
3 + 2 + 2 ...................... 1
6 + 1 .......................... 0
3 + 3 + 1 ...................... 2
4 + 2 + 1 ...................... 0
2 + 2 + 2 + 1 .................. 0
5 + 1 + 1 ...................... 0
3 + 2 + 1 + 1 .................. 1
4 + 1 + 1 + 1 .................. 0
2 + 2 + 1 + 1 + 1 .............. 0
3 + 1 + 1 + 1 + 1 .............. 1
2 + 1 + 1 + 1 + 1 + 1 .......... 0
1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
. 13 - 7 = 6
The difference between the sum of the third column and the sum of the fourth column of the set of partitions of 7 is 13 - 7 = 6 and equals the number of 3's in all partitions of 7, so a(7) = 6.
(End)
- Alois P. Heinz, Table of n, a(n) for n = 1..5000
- David Benson, Radha Kessar, and Markus Linckelmann, Hochschild cohomology of symmetric groups in low degrees, arXiv:2204.09970 [math.GR], 2022.
- Philip Cuthbertson, Fixed hooks in arbitrary columns of partitions, Integers (2025) Vol. 25, Art. No. A28. See p. 3.
- Eric Weisstein's World of Mathematics, q-Pochhammer Symbol
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=3, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 3], {n, 1, 50} ]
b[n_, i_] := b[n, i] = Module[{g}, If[n==0 || i==1, {1, 0}, g = If[i>n, {0, 0}, b[n-i, i]]; b[n, i-1] + g + {0, If[i==3, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
Join[{0, 0}, (1/((1 - x^3) QPochhammer[x]) + O[x]^50)[[3]]] (* Vladimir Reshetnikov, Nov 22 2016 *)
A024789
Number of 5's in all partitions of n.
Original entry on oeis.org
0, 0, 0, 0, 1, 1, 2, 3, 5, 8, 12, 17, 25, 35, 50, 68, 94, 126, 170, 226, 299, 391, 511, 660, 853, 1091, 1393, 1766, 2235, 2811, 3527, 4403, 5484, 6800, 8415, 10369, 12752, 15627, 19110, 23298, 28346, 34389, 41642, 50295, 60636, 72929, 87563, 104903, 125470
Offset: 1
From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 8 we have:
--------------------------------------
. Number
Partitions of 8 of 5's
--------------------------------------
8 .............................. 0
4 + 4 .......................... 0
5 + 3 .......................... 1
6 + 2 .......................... 0
3 + 3 + 2 ...................... 0
4 + 2 + 2 ...................... 0
2 + 2 + 2 + 2 .................. 0
7 + 1 .......................... 0
4 + 3 + 1 ...................... 0
5 + 2 + 1 ...................... 1
3 + 2 + 2 + 1 .................. 0
6 + 1 + 1 ...................... 0
3 + 3 + 1 + 1 .................. 0
4 + 2 + 1 + 1 .................. 0
2 + 2 + 2 + 1 + 1 .............. 0
5 + 1 + 1 + 1 .................. 1
3 + 2 + 1 + 1 + 1 .............. 0
4 + 1 + 1 + 1 + 1 .............. 0
2 + 2 + 1 + 1 + 1 + 1 .......... 0
3 + 1 + 1 + 1 + 1 + 1 .......... 0
2 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 .. 0
------------------------------------
. 7 - 4 = 3
The difference between the sum of the fifth column and the sum of the sixth column of the set of partitions of 8 is 7 - 4 = 3 and equals the number of 5's in all partitions of 8, so a(8) = 3.
(End)
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=5, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 5], {n, 1, 50} ]
(* second program: *)
b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 5, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
-
x='x+O('x^50); concat([0, 0, 0, 0], Vec(x^5/(1 - x^5) * prod(k=1, 50, 1/(1 - x^k)))) \\ Indranil Ghosh, Apr 06 2017
A024790
Number of 6's in all partitions of n.
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 12, 16, 24, 33, 47, 63, 89, 117, 159, 209, 278, 360, 474, 607, 786, 1001, 1280, 1615, 2049, 2565, 3222, 4011, 4998, 6180, 7653, 9407, 11571, 14154, 17308, 21063, 25630, 31044, 37586, 45339, 54646, 65646, 78804, 94305, 112761, 134473
Offset: 1
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=6, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 6], {n, 1, 52} ]
b[n_, i_] := b[n, i] = Module[{g}, If [n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 6, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
A024794
Number of 10's in all partitions of n.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 43, 57, 79, 104, 140, 183, 242, 312, 407, 520, 670, 849, 1081, 1359, 1715, 2141, 2678, 3322, 4125, 5085, 6274, 7691, 9430, 11502, 14025, 17024, 20655, 24959, 30140, 36270, 43612, 52274, 62604, 74763
Offset: 1
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
- David Benson, Radha Kessar, and Markus Linckelmann, Hochschild cohomology of symmetric groups in low degrees, arXiv:2204.09970 [math.GR], 2022.
- Joseph Vandehey, Digital problems in the theory of partitions, Integers (2024) Vol. 24A, Art. No. A18. See p. 3.
Cf.
A066633,
A000070(n-1),
A024786,
A024787,
A024788,
A024789,
A024790,
A024791,
A024792,
A024793,
A000041.
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=10, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 10], {n, 1, 55} ]
b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 10, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
A024791
Number of 7's in all partitions of n.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 16, 23, 32, 45, 61, 84, 112, 151, 199, 263, 342, 446, 574, 739, 943, 1201, 1518, 1917, 2404, 3010, 3749, 4661, 5766, 7122, 8759, 10753, 13153, 16059, 19544, 23743, 28759, 34774, 41938, 50491, 60642, 72718, 87004, 103934, 123908
Offset: 1
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=7, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
<< DiscreteMath`Combinatorica`; Table[ Count[ Flatten[ Partitions[n]], 7], {n, 1, 52} ]
Table[Count[Flatten[IntegerPartitions[n]],7],{n,55}] (* Harvey P. Dale, Feb 26 2015 *)
b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 7, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
-
x='x+O('x^50); concat([0, 0, 0, 0, 0, 0], Vec(x^7/(1 - x^7) * prod(k=1, 50, 1/(1 - x^k)))) \\ Indranil Ghosh, Apr 06 2017
A024792
Number of 8's in all partitions of n.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 23, 31, 44, 59, 82, 108, 146, 191, 254, 328, 429, 549, 709, 900, 1148, 1446, 1829, 2286, 2865, 3559, 4427, 5465, 6752, 8288, 10178, 12429, 15175, 18442, 22404, 27102, 32767, 39473, 47516, 57012, 68349, 81703, 97579, 116236
Offset: 1
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=8, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 8], {n, 1, 53} ]
(* second program: *)
b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 8, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
A024793
Number of 9's in all partitions of n.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 22, 31, 43, 58, 80, 106, 142, 187, 246, 319, 416, 533, 685, 872, 1108, 1397, 1762, 2204, 2755, 3426, 4251, 5250, 6476, 7950, 9746, 11905, 14514, 17638, 21403, 25888, 31265, 37661, 45288, 54329, 65079, 77775
Offset: 1
-
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(i=9, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Table[ Count[ Flatten[ IntegerPartitions[n]], 9], {n, 1, 55} ]
(* second program: *)
b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 9, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
A265253
Triangle read by rows: T(n,k) is the number of partitions of n having k even singletons (n,k>=0).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 3, 2, 4, 3, 6, 4, 1, 8, 6, 1, 11, 9, 2, 15, 12, 3, 19, 18, 5, 25, 24, 7, 34, 32, 10, 1, 43, 43, 14, 1, 54, 59, 20, 2, 70, 76, 27, 3, 89, 99, 38, 5, 111, 129, 50, 7, 140, 165, 69, 11, 174, 211, 90, 15, 216, 270, 119, 21, 1, 268, 339, 155, 29, 1, 328, 429, 203, 40, 2
Offset: 0
T(6,1) = 4 because each of the partitions [1,1,1,1,2], [1,2,3], [1,1,4], [6] of n = 6 has 1 even singleton, while the other partitions, namely [1,1,1,1,1,1], [1,1,2,2], [2,2,2], [1,1,1,3], [3,3], [2,4], [1,5], have 0, 0, 0 ,0, 0, 2, 0 even singletons.
Triangle starts:
1;
1;
1, 1;
2, 1;
3, 2;
4, 3;
6, 4, 1.
-
g := mul(((1-x^(2*j))*(1+t*x^(2*j))+x^(4*j))/(1-x^j), j = 1 .. 80): gser := simplify(series(g, x = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(gser, x, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, q), q = 0 .. degree(P[n])) end do; # yields sequence in triangular form
# second Maple program:
b:= proc(n, i) option remember; expand(
`if`(n=0, 1, `if`(i<1, 0, add(b(n-i*j, i-1)*
`if`(j=1 and i::even, x, 1), j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
seq(T(n), n=0..30); # Alois P. Heinz, Jan 01 2016
-
b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1]*If[j == 1 && EvenQ[i], x, 1], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[ T[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Jan 20 2016, after Alois P. Heinz *)
Showing 1-10 of 14 results.
Comments