A182713
Number of 3's in the last section of the set of partitions of n.
Original entry on oeis.org
0, 0, 1, 0, 1, 2, 2, 3, 6, 6, 10, 14, 18, 24, 35, 42, 58, 76, 97, 124, 164, 202, 261, 329, 412, 514, 649, 795, 992, 1223, 1503, 1839, 2262, 2741, 3346, 4056, 4908, 5919, 7150, 8568, 10297, 12320, 14721, 17542, 20911, 24808, 29456, 34870, 41232, 48652, 57389
Offset: 1
a(7) = 2 counts the 3's in 7 = 4+3 = 3+2+2. The 3's in 7 = 3+3+1 = 3+2+1+1 = 3+1+1+1+1 do not count.
From _Omar E. Pol_, Oct 27 2012: (Start)
--------------------------------------
Last section Number
of the set of of
partitions of 7 3's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 1
5 + 2 .......................... 0
3 + 2 + 2 ...................... 1
. 1 .......................... 0
. 1 ...................... 0
. 1 ...................... 0
. 1 .................. 0
. 1 ...................... 0
. 1 .................. 0
. 1 .................. 0
. 1 .............. 0
. 1 .............. 0
. 1 .......... 0
. 1 ...... 0
------------------------------------
. 5 - 3 = 2
.
In the last section of the set of partitions of 7 the difference between the sum of the third column and the sum of the fourth column is 5 - 3 = 2 equaling the number of 3's, so a(7) = 2 (see also A024787).
(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=3, h[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..70); # Alois P. Heinz, Mar 18 2012
-
z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 2]], {n, 0, z}] (* Clark Kimberling, Mar 31 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]]; Join[g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i == 3, h[[1]], 0]]]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Nov 30 2015, after Alois P. Heinz *)
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 3], {n, 51}] (* Robert Price, May 15 2020 *)
-
A182713 = lambda n: sum(list(p).count(3) for p in Partitions(n) if 1 not in p) # D. S. McNeil, Nov 29 2010
A220504
Triangle read by rows: T(n,k) is the total number of appearances of k as the smallest part in all partitions of n.
Original entry on oeis.org
1, 2, 1, 4, 0, 1, 7, 2, 0, 1, 12, 1, 0, 0, 1, 19, 4, 2, 0, 0, 1, 30, 3, 1, 0, 0, 0, 1, 45, 8, 1, 2, 0, 0, 0, 1, 67, 7, 4, 1, 0, 0, 0, 0, 1, 97, 15, 3, 1, 2, 0, 0, 0, 0, 1, 139, 15, 4, 1, 1, 0, 0, 0, 0, 0, 1, 195, 27, 8, 4, 1, 2, 0, 0, 0, 0, 0, 1, 272, 29, 8, 3, 1, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Triangle begins:
1;
2, 1;
4, 0, 1;
7, 2, 0, 1;
12, 1, 0, 0, 1;
19, 4, 2, 0, 0, 1;
30, 3, 1, 0, 0, 0, 1;
45, 8, 1, 2, 0, 0, 0, 1;
67, 7, 4, 1, 0, 0, 0, 0, 1;
97, 15, 3, 1, 2, 0, 0, 0, 0, 1;
139, 15, 4, 1, 1, 0, 0, 0, 0, 0, 1;
195, 27, 8, 4, 1, 2, 0, 0, 0, 0, 0, 1;
272, 29, 8, 3, 1, 1, 0, 0, 0, 0, 0, 0, 1;
...
The partitions of 6 with the smallest part in brackets are
..........................
. [6]
..........................
. [3]+[3]
..........................
. 4 +[2]
. [2]+[2]+[2]
..........................
. 5 +[1]
. 3 + 2 +[1]
. 4 +[1]+[1]
. 2 + 2 +[1]+[1]
. 3 +[1]+[1]+[1]
. 2 +[1]+[1]+[1]+[1]
. [1]+[1]+[1]+[1]+[1]+[1]
..........................
There are 19 smallest parts of size 1. Also there are four smallest parts of size 2. Also there are two smallest parts of size 3. There are no smallest part of size 4 or 5. Finally there is only one smallest part of size 6. So row 6 gives 19, 4, 2, 0, 0, 1. The sum of row 6 is 19+4+2+0+0+1 = A092269(6) = 26.
-
b:= proc(n, i) option remember; local j, r; if n=0 or i<1 then 0
else `if`(irem(n, i, 'r')=0, [0$(i-1), r], []); for j from 0
to n/i do zip((x, y)->x+y, %, [b(n-i*j, i-1)], 0) od; %[] fi
end:
T:= n-> b(n, n):
seq(T(n), n=1..20); # Alois P. Heinz, Jan 20 2013
-
b[n_, i_] := b[n, i] = Module[{j, q, r, pc}, If [n == 0 || i<1, 0, {q, r} = QuotientRemainder[n, i]; pc = If[r == 0, Append[Array[0&, i-1], q], {}]; For[j = 0, j <= n/i, j++, pc = Plus @@ PadRight[{pc, b[n-i*j, i-1]}]]; pc]]; T[n_] := b[n, n]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)
A240056
Number of partitions of n such that m(1) > m(2), where m = multiplicity.
Original entry on oeis.org
0, 1, 1, 1, 3, 4, 5, 9, 12, 16, 24, 32, 42, 59, 77, 100, 134, 173, 221, 288, 366, 463, 590, 741, 926, 1163, 1444, 1787, 2215, 2726, 3342, 4101, 5003, 6087, 7402, 8964, 10827, 13069, 15718, 18865, 22617, 27041, 32263, 38453, 45719, 54264, 64326, 76102, 89884
Offset: 0
a(7) counts these 9 partitions: 61, 511, 4111, 331, 3211, 31111, 22111, 211111, 1111111.
-
z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 2]], {n, 0, z}] (* A182713 *)
t2 = Table[Count[f[n], p_ /; Count[p, 1] <= Count[p, 2]], {n, 0, z}] (* A182713(n+2) *)
t3 = Table[Count[f[n], p_ /; Count[p, 1] == Count[p, 2]], {n, 0, z}] (* A174455 *)
t4 = Table[Count[f[n], p_ /; Count[p, 1] > Count[p, 2]], {n, 0, z}] (* A240056 *)
t5 = Table[Count[f[n], p_ /; Count[p, 1] >= Count[p, 2]], {n, 0, z}] (* A240056(n+1) *)
Showing 1-3 of 3 results.
Comments