A000097
Number of partitions of n if there are two kinds of 1's and two kinds of 2's.
Original entry on oeis.org
1, 2, 5, 9, 17, 28, 47, 73, 114, 170, 253, 365, 525, 738, 1033, 1422, 1948, 2634, 3545, 4721, 6259, 8227, 10767, 13990, 18105, 23286, 29837, 38028, 48297, 61053, 76926, 96524, 120746, 150487, 187019, 231643, 286152, 352413, 432937, 530383, 648245
Offset: 0
a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
From _Gus Wiseman_, Jun 22 2021: (Start)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
(1,1) (3,1) (3,3) (5,3)
(2,1,1) (5,1) (7,1)
(3,2,1) (3,3,2)
(4,1,1) (4,3,1)
(2,2,1,1) (5,2,1)
(6,1,1)
(3,2,2,1)
(4,2,1,1)
(2,2,2,1,1)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
(2) (3,1) (4,2) (5,3)
(2,1,1) (2,2,2) (3,3,2)
(3,2,1) (4,3,1)
(3,1,1,1) (3,2,2,1)
(2,1,1,1,1) (4,2,1,1)
(2,2,2,1,1)
(3,2,1,1,1)
(3,1,1,1,1,1)
(2,1,1,1,1,1,1)
(End)
- 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.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe and Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from T. D. Noe)
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
- Christian Gutschwager, The skew diagram poset and components of skew characters, arXiv:1104.0008 [math.CO], 2011.
- Christian Gutschwager, Reduced Kronecker products which are multiplicity free or contain only a few components, Eur. J. Combinat. 31 (2010) 1996-2005. doi:10.1016/j.ejc.2010.05.008.
- J. P. Robinson, Edges in the poset of partitions of an integer, J. Combin. Theory Ser. A, 48 (1988), 236-238.
- N. J. A. Sloane, Transforms
The case of reverse-alternating sum 1 or alternating sum 0 is
A000041.
The case of reverse-alternating sum -1 or alternating sum 1 is
A000070.
The case of reverse-alternating sum 2 is
A120452.
The case of reverse-alternating sum -2 is
A344741.
A001700 counts compositions with alternating sum 2.
A035363 counts partitions into even parts.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A124754 gives alternating sums of standard compositions (reverse:
A344618).
A316524 is the alternating sum of the prime indices of n (reverse:
A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Cf.
A006330,
A027187,
A239830,
A306145,
A343941,
A344607,
A344608,
A344619,
A344650,
A344651,
A344740.
-
with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
-
CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* Ben Branman, Mar 07 2012 *)
etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
(1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 22 2016 *)
Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* Robert Price, Jul 28 2020 and Jun 21 2021 *)
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 + 3, 2];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* Gus Wiseman, Jun 21 2021 *)
-
my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ Joerg Arndt, Apr 29 2013
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
A182712
Number of 2's in the last section of the set of partitions of n.
Original entry on oeis.org
0, 0, 1, 0, 2, 1, 4, 3, 8, 7, 15, 15, 27, 29, 48, 53, 82, 94, 137, 160, 225, 265, 362, 430, 572, 683, 892, 1066, 1370, 1640, 2078, 2487, 3117, 3725, 4624, 5519, 6791, 8092, 9885, 11752, 14263, 16922, 20416, 24167, 29007, 34254, 40921, 48213, 57345, 67409
Offset: 0
a(6) = 4 counts the 2's in 6 = 4+2 = 2+2+2. The 2's in 6 = 3+2+1 = 2+2+1+1 = 2+1+1+1+1 do not count. - _Omar E. Pol_, Nov 13 2011
From _Omar E. Pol_, Oct 27 2012: (Start)
----------------------------------
Last section Number
of the set of of
partitions of 6 2's
----------------------------------
6 .......................... 0
3 + 3 ...................... 0
4 + 2 ...................... 1
2 + 2 + 2 .................. 3
. 1 ...................... 0
. 1 .................. 0
. 1 .................. 0
. 1 .............. 0
. 1 .............. 0
. 1 .......... 0
. 1 ...... 0
---------------------------------
. 8 - 4 = 4
.
In the last section of the set of partitions of 6 the difference between the sum of the second column and the sum of the third column is 8 - 4 = 4, the same as the number of 2's, so a(6) = 4 (see also A024786).
(End)
-
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 2], {n, 0, 49}] (* Robert Price, May 15 2020 *)
-
A182712 = lambda n: sum(list(p).count(2) for p in Partitions(n) if 1 not in p) # Omar E. Pol, Nov 13 2011
A372688
Number of integer partitions y of n whose rank Sum_i 2^(y_i-1) is prime.
Original entry on oeis.org
0, 0, 2, 2, 1, 3, 3, 6, 3, 6, 9, 20, 13, 22, 22, 45, 47, 70, 75, 100, 107, 132, 157, 202, 229, 302, 396, 495, 536, 699, 820, 962, 1193, 1507, 1699, 2064, 2455, 2945, 3408, 4026, 4691, 5749, 6670, 7614, 9127, 10930, 12329, 14370, 16955, 19961, 22950, 26574, 30941
Offset: 0
The partition (3,2,1) has rank 2^(3-1) + 2^(2-1) + 2^(1-1) = 7, which is prime, so (3,2,1) is counted under a(6).
The a(2) = 2 through a(10) = 9 partitions:
(2) (21) (31) (221) (51) (421) (431) (441) (91)
(11) (111) (2111) (321) (2221) (521) (3321) (631)
(11111) (3111) (4111) (5111) (4221) (721)
(22111) (33111) (3331)
(211111) (42111) (7111)
(1111111) (411111) (32221)
(322111)
(3211111)
(31111111)
For all positive integers (not just prime) we get
A000041.
These partitions have Heinz numbers
A277319.
A014499 lists binary indices of prime numbers.
A372885 lists primes whose binary indices sum to a prime, indices
A372886.
Cf.
A000040,
A005940,
A023506,
A029837,
A035100,
A038499,
A096111,
A372429,
A372441,
A372471,
A372689.
-
Table[Length[Select[IntegerPartitions[n], PrimeQ[Total[2^#]/2]&]],{n,0,30}]
A103628
Total sum of parts of multiplicity 1 in all partitions of n.
Original entry on oeis.org
0, 1, 2, 6, 10, 21, 33, 59, 89, 145, 212, 325, 463, 680, 948, 1348, 1845, 2558, 3446, 4681, 6219, 8306, 10901, 14352, 18632, 24230, 31151, 40077, 51074, 65088, 82290, 103986, 130517, 163679, 204078, 254174, 314975, 389839, 480369, 591133, 724600, 886965
Offset: 0
Partitions of 4 are [1,1,1,1], [1,1,2], [2,2], [1,3], [4] and a(4) = 0 + 2 + 0 + (1+3) + 4 = 10.
-
gf:=x*(1+x+x^2)/(1-x^2)^2/product((1-x^k), k=1..500): s:=series(gf, x, 100): for n from 0 to 60 do printf(`%d,`,coeff(s, x, n)) od: # James Sellers, Apr 22 2005
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0, [1, 0],
`if`(i<1, [0, 0], add((l->`if`(j=1, [l[1],
l[2]+l[1]*i], l))(b(n-i*j, i-1)), j=0..n/i)))
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=0..50); # Alois P. Heinz, Feb 03 2013
-
b[n_, p_] := b[n, p] = If[n == 0 && p == 0, {1, 0}, If[p == 0, Array[0&, n+2], Sum[Function[l, ReplacePart[l, m+2 -> p*l[[1]] + l[[m+2]]]][Join[b[n-p*m, p-1], Array[0&, p*m]]], {m, 0, n/p}]]]; a[n_] := b[n, n][[3]]; a[0] = 0; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)
A100818
For a given unrestricted partition pi, let P(pi)=lambda(pi), if mu(pi)=0. If mu(pi)>0 then let P(pi)=nu(pi), where nu(pi) is the number of parts of pi greater than mu(pi), mu(pi) is the number of ones in pi and lambda(pi) is the largest part of pi.
Original entry on oeis.org
1, 2, 1, 4, 3, 8, 7, 15, 15, 27, 29, 48, 53, 82, 94, 137, 160, 225, 265, 362, 430, 572, 683, 892, 1066, 1370, 1640, 2078, 2487, 3117, 3725, 4624, 5519, 6791, 8092, 9885, 11752, 14263, 16922, 20416, 24167, 29007, 34254, 40921, 48213, 57345, 67409, 79864
Offset: 1
a(3)=1 because P(3)=3, P(2 1)=1 and P(1 1 1)=0.
-
Rest[ CoefficientList[ Series[x + 1/(1 + x) Product[1/(1 - x^n), {n, 50}], {x, 0, 50}], x]] (* Robert G. Wilson v, Feb 11 2005 *)
A372687
Number of prime numbers whose binary indices sum to n. Number of strict integer partitions y of n such that Sum_i 2^(y_i-1) is prime.
Original entry on oeis.org
0, 0, 1, 1, 1, 0, 2, 1, 2, 0, 3, 3, 1, 4, 1, 6, 5, 8, 4, 12, 8, 12, 7, 20, 8, 16, 17, 27, 19, 38, 19, 46, 33, 38, 49, 65, 47, 67, 83, 92, 94, 113, 103, 130, 146, 127, 215, 224, 176, 234, 306, 270, 357, 383, 339, 393, 537, 540, 597, 683, 576, 798, 1026, 830, 1157
Offset: 0
The a(2) = 1 through a(17) = 8 prime numbers:
2 3 5 . 17 11 19 . 257 131 73 137 97 521 4099 1031
7 13 67 41 71 263 2053 523
37 23 43 139 1033 269
29 83 193 163
53 47 149
31 101
89
79
The a(2) = 1 through a(11) = 3 strict partitions:
(2) (2,1) (3,1) . (5,1) (4,2,1) (4,3,1) . (9,1) (6,4,1)
(3,2,1) (5,2,1) (6,3,1) (8,2,1)
(7,2,1) (5,3,2,1)
For all positive integers (not just prime) we get
A000009.
Number of prime numbers p with
A029931(p) = n.
Number of times n appears in
A372429.
Number of rows of
A372471 with sum n.
These (strict) partitions have Heinz numbers
A372851.
A014499 lists binary indices of prime numbers.
A096111 gives product of binary indices.
A372689 lists numbers whose binary indices sum to a prime.
A372885 lists primes whose binary indices sum to a prime, indices
A372886.
Cf.
A000040,
A005940,
A023506,
A029837,
A035100,
A071814,
A230877,
A231204,
A359359,
A372436,
A372441.
-
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&PrimeQ[Total[2^#]/2]&]],{n,0,30}]
A092295
Number of partitions of n with even number (or 0) 2's.
Original entry on oeis.org
1, 1, 1, 2, 4, 5, 7, 10, 15, 20, 27, 36, 50, 65, 85, 111, 146, 186, 239, 304, 388, 488, 614, 767, 961, 1191, 1475, 1819, 2243, 2746, 3361, 4096, 4988, 6047, 7322, 8836, 10655, 12801, 15360, 18384, 21978, 26199, 31196, 37062, 43979, 52072, 61579, 72682
Offset: 0
a(5)=5 because the partitions [5],[4,1],[3,1,1],[2,2,1] and [1,1,1,1,1] of 5 have an even number of 2's ([3,2] and [2,1,1,1] do not qualify).
-
g:=1/(1+x^2)/product(1-x^j,j=1..70): gser:=series(g,x=0,50): seq(coeff(gser,x,n),n=0..47); # Emeric Deutsch, Mar 30 2006
-
nmax = 50; CoefficientList[Series[1/((1+x^2) * Product[1-x^k, {k, 1, nmax}]), {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 30 2015 *)
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 *)
A265257
Number of odd singletons in all partitions of n (n>=0).
Original entry on oeis.org
0, 1, 0, 2, 2, 5, 5, 11, 13, 23, 28, 45, 57, 86, 108, 156, 199, 276, 350, 475, 601, 798, 1005, 1312, 1646, 2120, 2643, 3365, 4178, 5264, 6500, 8122, 9981, 12375, 15136, 18638, 22697, 27779, 33679, 40993, 49504, 59947, 72109
Offset: 0
a(6) = 5 because in [1,1,1,3], [1,2,3], [1,5] we have 1+2+2 odd singletons, while the other 8 partitions of 6 have no odd singletons.
-
g := x*(1-x+x^2)/((1-x^4)*mul(1-x^j, j = 1 .. 80)): gser := series(g, x = 0, 55): seq(coeff(gser, x, m), m = 0 .. 50);
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0, [1, 0],
`if`(i<1, 0, add((p-> `if`(j=1 and i::odd, p+
[0, p[1]], p))(b(n-i*j, i-1)), j=0..n/i)))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=0..80); # Alois P. Heinz, Jan 01 2016
-
nmax = 50; CoefficientList[Series[x*(1-x+x^2)/(1-x^4) * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jan 01 2016 *)
A270143
a(n) = Sum_{k=0..n} (-1)^(k+1) * k * A000041(n-k).
Original entry on oeis.org
0, 1, -1, 3, -2, 6, -3, 11, -4, 19, -4, 31, -2, 50, 3, 79, 15, 122, 38, 187, 78, 284, 146, 426, 257, 635, 431, 939, 701, 1377, 1110, 2007, 1718, 2906, 2613, 4178, 3914, 5971, 5781, 8482, 8440, 11976, 12191, 16816, 17438, 23483, 24730, 32615, 34794, 45070
Offset: 0
-
Table[Sum[(-1)^(n-k+1)*PartitionsP[k]*(n-k), {k, 0, n}], {n, 0, 100}]
nmax = 100; CoefficientList[Series[x/(1 + x)^2 * Product[1/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]
Showing 1-10 of 15 results.
Comments